Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IWB-6: Added more loading spinners #304

Merged
merged 192 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
8ca9933
added blacklist hook
FrankreedX Jul 14, 2024
657384e
Merge branch 'main' into frankreed/foreignManagement1_blacklist_hook
FrankreedX Jul 14, 2024
296e07d
Merge branch 'main' into frankreed/foreignManagement1_blacklist_hook
FrankreedX Jul 15, 2024
ac7e815
black list feature works
FrankreedX Jul 16, 2024
0853aa4
Merge branch 'main' into frankreed/foreignManagement1_blacklist_hook
FrankreedX Jul 16, 2024
999af90
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Jul 16, 2024
9fa672f
some unused stuff removal
FrankreedX Jul 16, 2024
5c66aba
waitlist seems to work
FrankreedX Jul 19, 2024
f5a1855
simplified removeBlacklist.js
FrankreedX Jul 19, 2024
7c7625d
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Jul 19, 2024
ca85173
pretty
FrankreedX Jul 20, 2024
852c832
removed transaction and hope that it works
FrankreedX Jul 21, 2024
b9c50ef
Merge branch 'frankreed/remove-user-assertion-failed-fix' into frankr…
FrankreedX Jul 21, 2024
4f5ac10
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Jul 21, 2024
d3fd882
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Jul 21, 2024
72c08a6
fixed useBlackList.js hook firestore error, and made blacklist check …
FrankreedX Jul 21, 2024
6ea881f
added refresh spinner for chooseTeam.js
FrankreedX Jul 21, 2024
6ac7af1
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Jul 21, 2024
ed8f8db
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Jul 21, 2024
07142cd
updated invalidateKeys and fixed some styling
FrankreedX Jul 21, 2024
872e3ce
updated faulty invalidateKeys lists
FrankreedX Jul 21, 2024
817972a
kinda works lmao
FrankreedX Jul 21, 2024
3b1463a
Merge branch 'frankreed/remove-user-assertion-failed-fix' into frankr…
FrankreedX Jul 21, 2024
52b16f8
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Jul 21, 2024
edee24f
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Jul 21, 2024
8fb3f94
updated the invalidateKeys again
FrankreedX Jul 21, 2024
91ab448
navigation off chooseTeam works. Tech debt +1
FrankreedX Jul 21, 2024
baa4e90
half finished progress
FrankreedX Jul 23, 2024
8183b22
Merge branch 'main' into frankreed/remove-user-assertion-failed-fix
FrankreedX Jul 23, 2024
6415dfe
Merge branch 'frankreed/remove-user-assertion-failed-fix' into frankr…
FrankreedX Jul 23, 2024
54469bf
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Jul 23, 2024
ddc53cc
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Jul 23, 2024
12dc38f
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Jul 23, 2024
eb76078
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Jul 23, 2024
f763731
Merge branch 'main' into frankreed/remove-user-assertion-failed-fix
FrankreedX Aug 2, 2024
91cea9e
Merge branch 'frankreed/remove-user-assertion-failed-fix' into frankr…
FrankreedX Aug 2, 2024
51e60d3
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 2, 2024
0fba67e
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 2, 2024
3e5a65e
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 2, 2024
06963df
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 2, 2024
3f52e48
invite works
FrankreedX Aug 3, 2024
180b096
added waitlistError to ErrorComponent
FrankreedX Aug 3, 2024
dfddbc0
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 3, 2024
d54e5c1
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 3, 2024
2743407
pretty
FrankreedX Aug 3, 2024
46f85e9
text input moves above keyboard now
FrankreedX Aug 3, 2024
f983bbf
Merge branch 'main' into frankreed/remove-user-assertion-failed-fix
FrankreedX Aug 4, 2024
c9c8fbf
Merge branch 'frankreed/remove-user-assertion-failed-fix' into frankr…
FrankreedX Aug 4, 2024
5e1dc1b
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 4, 2024
49b040e
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 4, 2024
2055022
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 4, 2024
0f4459b
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 4, 2024
fe9e79e
Merge branch 'main' into frankreed/remove-user-assertion-failed-fix
FrankreedX Aug 4, 2024
3872b6f
Merge branch 'frankreed/remove-user-assertion-failed-fix' into frankr…
FrankreedX Aug 4, 2024
b3481a3
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 4, 2024
de580e8
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 4, 2024
3ce1c25
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 4, 2024
02c7865
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 4, 2024
35a5a26
minor comment change
FrankreedX Aug 4, 2024
1ae93ef
changed console log wording in removeBlacklist
FrankreedX Aug 4, 2024
f869cfb
removed copied over comment
FrankreedX Aug 4, 2024
30081f4
Merge remote-tracking branch 'origin/frankreed/foreignManagement2_bla…
FrankreedX Aug 4, 2024
340cb4d
updated tiny comment
FrankreedX Aug 4, 2024
b5ed7d8
removed redundant log
FrankreedX Aug 4, 2024
a066201
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 4, 2024
067f6b4
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 4, 2024
6d3fdd7
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 4, 2024
45e627d
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 4, 2024
cfd9e15
fix - added email to blacklist record
Gehrkej Aug 4, 2024
6bff91c
fix - added assertion if pfp exists when removing a user
Gehrkej Aug 4, 2024
a6dcbc8
Merge branch 'main' into Gehrkej/fix/add-email-to-blacklist
FrankreedX Aug 4, 2024
89b82c9
Merge branch 'Gehrkej/fix/add-email-to-blacklist' into frankreed/fore…
FrankreedX Aug 4, 2024
6c48415
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 4, 2024
58d3865
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 4, 2024
8dab777
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 4, 2024
87e7e80
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 4, 2024
605472b
Merge branch 'main' into frankreed/foreignManagement1_blacklist_hook
FrankreedX Aug 6, 2024
7619df3
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 6, 2024
ab422e6
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 6, 2024
4bfbaab
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 6, 2024
4204c74
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 6, 2024
65cff29
added loading spinner to all buttons
FrankreedX Aug 6, 2024
3cf56c3
can't invite already invited email
FrankreedX Aug 6, 2024
fe94315
accepting invite will remove the invite
FrankreedX Aug 6, 2024
d4c180a
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 6, 2024
a5b58e8
workin on remove user
FrankreedX Aug 6, 2024
d20d3dd
added invitelist bug fix
FrankreedX Aug 6, 2024
6a77ea0
migrating to react native paper Button's loading property for loading…
FrankreedX Aug 6, 2024
6dd59e6
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 6, 2024
cc97e8c
redundant comment
FrankreedX Aug 7, 2024
d1413af
:/
FrankreedX Aug 7, 2024
553300c
Merge branch 'main' into frankreed/foreignManagement1_blacklist_hook
FrankreedX Aug 7, 2024
06c7b91
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 7, 2024
db00910
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 7, 2024
35cd182
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 7, 2024
59ec3cf
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 7, 2024
43c1add
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 7, 2024
eb74065
prevent double navigation to chooseTeam screen
FrankreedX Aug 7, 2024
326dc00
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 7, 2024
7ad4d1d
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 7, 2024
8a4132f
remove half baked loading spinner on dialog component (will be its ow…
FrankreedX Aug 7, 2024
181ac9a
changed dialog component's signature to contain loading
FrankreedX Aug 7, 2024
71823f0
fixed "invalid-argument"
FrankreedX Aug 7, 2024
364abe7
Merge branch 'frankreed/remove_user_invalid_argument' into frankreed/…
FrankreedX Aug 7, 2024
c8d412e
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 7, 2024
dd31a1f
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 7, 2024
57ef84e
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 7, 2024
b0ddd79
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 7, 2024
b173acc
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 7, 2024
881ee57
Merge branch 'frankreed/foreignManagement6_add_loading_spinner' into …
FrankreedX Aug 7, 2024
68aad1c
added key
FrankreedX Aug 7, 2024
c6aba50
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 7, 2024
18d78ca
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 7, 2024
9048f77
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 7, 2024
f95ca38
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 7, 2024
c46eb8c
Merge branch 'frankreed/foreignManagement6_add_loading_spinner' into …
FrankreedX Aug 7, 2024
e4b082d
last usage of Activity Indicator in a simple button replaced
FrankreedX Aug 7, 2024
5dc01b4
Merge branch 'frankreed/foreignManagement6_add_loading_spinner' into …
FrankreedX Aug 7, 2024
a030a08
Fixed Android keyboard avoiding for invitelist
FrankreedX Aug 8, 2024
d6c6471
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 8, 2024
d040a56
Merge branch 'frankreed/foreignManagement6_add_loading_spinner' into …
FrankreedX Aug 8, 2024
d9b2ab3
Merge branch 'main' into frankreed/remove_user_invalid_argument
FrankreedX Aug 12, 2024
f129a8f
Merge branch 'frankreed/remove_user_invalid_argument' into frankreed/…
FrankreedX Aug 12, 2024
fbee72c
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 12, 2024
16df1e7
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 12, 2024
41f1613
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 12, 2024
ffb514b
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 12, 2024
8502e6d
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 12, 2024
0b2e37f
Merge branch 'frankreed/foreignManagement6_add_loading_spinner' into …
FrankreedX Aug 12, 2024
118684e
removed redundant remove user fix
FrankreedX Aug 12, 2024
8951322
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 12, 2024
5fe346d
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 12, 2024
b76cba6
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 12, 2024
e1971d6
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 12, 2024
826c907
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 12, 2024
6f1f1a9
Merge branch 'frankreed/foreignManagement6_add_loading_spinner' into …
FrankreedX Aug 12, 2024
b6b0018
Merge branch 'main' into frankreed/remove_user_invalid_argument
FrankreedX Aug 13, 2024
310b3f9
Merge branch 'frankreed/remove_user_invalid_argument' into frankreed/…
FrankreedX Aug 13, 2024
d6aaba8
Merge remote-tracking branch 'origin/frankreed/foreignManagement2_bla…
FrankreedX Aug 13, 2024
e924029
pretty
FrankreedX Aug 13, 2024
2da6b41
Merge remote-tracking branch 'origin/frankreed/foreignManagement3_wai…
FrankreedX Aug 13, 2024
9737dc3
pretty
FrankreedX Aug 13, 2024
fca54a9
Merge remote-tracking branch 'origin/frankreed/foreignManagement4_ove…
FrankreedX Aug 13, 2024
e342ea5
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 13, 2024
0b4e27d
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 13, 2024
ab7034f
pretty
FrankreedX Aug 13, 2024
7dfe5b8
Merge remote-tracking branch 'origin/frankreed/foreignManagement7_dia…
FrankreedX Aug 13, 2024
8564bcf
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 13, 2024
307bc50
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 13, 2024
eec6a3b
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 13, 2024
3c2d9a2
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 13, 2024
a43b8e9
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 13, 2024
92af713
pretty
FrankreedX Aug 13, 2024
0d44915
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 13, 2024
e6c5e8a
pretty
FrankreedX Aug 13, 2024
fe33609
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 13, 2024
d6b73b3
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 13, 2024
a094d4c
pretty
FrankreedX Aug 13, 2024
8e4c349
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 13, 2024
590a055
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 13, 2024
472a708
IWB-7: allow using the "loading" property in DialogComponent (#313)
FrankreedX Aug 13, 2024
2194eb3
added missing state from merge
FrankreedX Aug 13, 2024
a67a223
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 13, 2024
189ecdc
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 13, 2024
3e944d5
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 13, 2024
af682fc
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 13, 2024
d6b114b
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 13, 2024
de570e5
simple fix
FrankreedX Aug 13, 2024
d0b040e
Merge branch 'frankreed/fix_verified_redirect_bug' into frankreed/for…
FrankreedX Aug 13, 2024
65ff8f0
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 13, 2024
cd94dc2
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 13, 2024
bbaf4fa
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 13, 2024
1d28b0f
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 13, 2024
40fe953
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 13, 2024
93a7cb2
better align invite input with above elements
FrankreedX Aug 15, 2024
e677c31
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 15, 2024
07d2346
changed more "white" to use themecolors, and added spinner color to s…
FrankreedX Aug 15, 2024
c2104b9
Merge branch 'main' into frankreed/fix_verified_redirect_bug
FrankreedX Aug 15, 2024
e54fe2e
Merge branch 'frankreed/fix_verified_redirect_bug' into frankreed/for…
FrankreedX Aug 15, 2024
9daf486
Merge branch 'frankreed/foreignManagement1_blacklist_hook' into frank…
FrankreedX Aug 15, 2024
75af2f7
Merge branch 'frankreed/foreignManagement2_blacklist_tab' into frankr…
FrankreedX Aug 15, 2024
21620ef
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 15, 2024
1ea9cfe
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 15, 2024
802a2b0
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 15, 2024
1440550
Merge branch 'main' into frankreed/foreignManagement3_waitlist_tab
FrankreedX Aug 15, 2024
cd8393d
Merge branch 'frankreed/foreignManagement3_waitlist_tab' into frankre…
FrankreedX Aug 15, 2024
0503312
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 15, 2024
b45e01e
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 15, 2024
c82967a
Merge branch 'main' into frankreed/foreignManagement4_overhaul_auth_r…
FrankreedX Aug 15, 2024
5417279
Merge branch 'frankreed/foreignManagement4_overhaul_auth_redirects' i…
FrankreedX Aug 15, 2024
4c9afac
Merge branch 'frankreed/foreignManagement5_invite_tab' into frankreed…
FrankreedX Aug 15, 2024
301c90b
Merge branch 'main' into frankreed/foreignManagement6_add_loading_spi…
FrankreedX Aug 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/(auth)/signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function SignIn() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [forgotLoading, setForgotLoading] = useState(false);
const [loginLoading, setLoginLoading] = useState(false);
const { setCurrentUserId } = useAuthContext();

const { height } = useWindowDimensions();
Expand Down Expand Up @@ -62,6 +63,7 @@ export default function SignIn() {
}, [timeIntervalPassword]);

async function handleSignIn() {
setLoginLoading(true);
if (process.env.EXPO_PUBLIC_TEST_UID) {
// Only allow login as test user while using `yarn test` to reduce errors
setCurrentUserId(process.env.EXPO_PUBLIC_TEST_UID);
Expand All @@ -74,6 +76,7 @@ export default function SignIn() {
showDialog("Error", getErrorString(e));
}
}
setLoginLoading(false);
}

async function handleForgotPassword() {
Expand Down Expand Up @@ -204,6 +207,7 @@ export default function SignIn() {
onPress={handleSignIn}
buttonColor={themeColors.accent}
labelStyle={styles.buttonText}
loading={loginLoading}
>
Login
</Button>
Expand All @@ -216,7 +220,7 @@ export default function SignIn() {
style={styles.button}
labelStyle={styles.buttonText}
>
Sign Up
Sign up
</Button>
</Link>
</View>
Expand Down
5 changes: 5 additions & 0 deletions app/(auth)/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ export default function SignUp() {
const [password, setPassword] = useState("");
const [passwordCheck, setPasswordCheck] = useState("");

const [signUpLoading, setSignUpLoading] = useState(false);

const { showDialog, showSnackBar } = useAlertContext();

const { height } = useWindowDimensions();

async function handleSubmit() {
setSignUpLoading(true);
try {
if (password !== passwordCheck) {
throw "Passwords don't match";
Expand Down Expand Up @@ -77,6 +80,7 @@ export default function SignUp() {
console.log(e);
showDialog("Error", getErrorString(e));
}
setSignUpLoading(false);
}

const styles = StyleSheet.create({
Expand Down Expand Up @@ -186,6 +190,7 @@ export default function SignUp() {
onPress={handleSubmit}
buttonColor={themeColors.accent}
labelStyle={styles.buttonText}
loading={signUpLoading}
>
Submit
</Button>
Expand Down
18 changes: 4 additions & 14 deletions app/content/assignments/players.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
import { doc, getDoc, runTransaction, updateDoc } from "firebase/firestore";
import { useCallback, useEffect, useMemo, useState } from "react";
import { ScrollView, View } from "react-native";
import {
ActivityIndicator,
Appbar,
Button,
Icon,
List,
Text,
} from "react-native-paper";
import { Appbar, Button, Icon, List, Text } from "react-native-paper";
import { SafeAreaView } from "react-native-safe-area-context";
import { once } from "underscore";
import { themeColors } from "~/Constants";
Expand Down Expand Up @@ -102,7 +95,7 @@
}, [assignmentList]);

const [loadingDelete, setLoadingDelete] = useState(false);
const handleDelete = useCallback(

Check warning on line 98 in app/content/assignments/players.js

View workflow job for this annotation

GitHub Actions / prettier-check

React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead
once(async () => {
setLoadingDelete(true);
try {
Expand Down Expand Up @@ -409,7 +402,7 @@
}}
mode="contained"
buttonColor={themeColors.accent}
textColor="white"
textColor={themeColors.highlight}
disabled={
!assignmentList.some((assignment) => assignment.markedForDelete)
}
Expand All @@ -420,12 +413,9 @@
},
}}
onPress={handleDelete}
loading={loadingDelete}
>
{loadingDelete ? (
<ActivityIndicator size={20} color={"#FFF"} />
) : (
"Delete"
)}
Delete
</Button>
</View>
)}
Expand Down
22 changes: 10 additions & 12 deletions app/content/profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
TouchableOpacity,
View,
} from "react-native";
import { ActivityIndicator, Appbar, Switch } from "react-native-paper";
import { ActivityIndicator, Appbar, Button, Switch } from "react-native-paper";
import { SafeAreaView } from "react-native-safe-area-context";
import { debounce } from "underscore";
import { themeColors } from "~/Constants";
Expand Down Expand Up @@ -96,7 +96,7 @@
setEmail(userEmail);
}, [userData, userEmail]);

const handleUpdate = useCallback(

Check warning on line 99 in app/content/profile/index.js

View workflow job for this annotation

GitHub Actions / prettier-check

React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead
debounce(
async () => {
setUpdateLoading(true);
Expand Down Expand Up @@ -267,11 +267,8 @@
},
saveChangesButton: {
backgroundColor: themeColors.accent,
paddingHorizontal: 20,
paddingVertical: 10,
borderRadius: 20,
width: 100,
marginBottom: 20,
width: 100, // Increase the width of the button
alignSelf: "center",
},
saveChangesButtonText: {
Expand Down Expand Up @@ -451,16 +448,17 @@
)}

{/* Save Button */}
<TouchableOpacity
<Button
style={styles.saveChangesButton}
onPress={handleUpdate}
textColor={themeColors.highlight}
labelStyle={{
fontWeight: "bold",
}}
loading={updateLoading}
>
{updateLoading ? (
<ActivityIndicator animating={true} size={16} color={"#FFF"} />
) : (
<Text style={styles.saveChangesButtonText}>Update</Text>
)}
</TouchableOpacity>
Update
</Button>

{/* Sign Out Button */}
<Pressable onPress={handleSignOut}>
Expand Down
30 changes: 18 additions & 12 deletions app/content/team/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function Index() {

const [resetDialogVisible, setResetDialogVisible] = useState(false);
const hideResetDialog = () => setResetDialogVisible(false);
const [resetLoading, setResetLoading] = useState(false);

const [newName, setNewName] = useState("");

Expand Down Expand Up @@ -222,18 +223,23 @@ function Index() {
content="Resetting the season will wipe all leaderboards"
visible={resetDialogVisible}
onHide={hideResetDialog}
buttons={["Cancel", "Reset Season"]}
buttonsFunctions={[
hideResetDialog,
async () => {
try {
await resetLeaderboards(currentTeamId);
await invalidateMultipleKeys(queryClient, [["best_attempts"]]);
hideResetDialog();
} catch (e) {
console.log("Error resetting season:", e);
showDialog("Error", getErrorString(e));
}
buttons={[
{ children: "Cancel", pressHandler: hideResetDialog },
{
children: "Reset Season",
pressHandler: async () => {
setResetLoading(true);
try {
await resetLeaderboards(currentTeamId);
await invalidateMultipleKeys(queryClient, [["best_attempts"]]);
hideResetDialog();
} catch (e) {
console.log("Error resetting season:", e);
showDialog("Error", getErrorString(e));
}
setResetLoading(false);
},
loading: resetLoading,
},
]}
/>
Expand Down
83 changes: 49 additions & 34 deletions app/content/team/users/[user]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ function Index() {

const [removeDialogVisible, setRemoveDialogVisible] = useState(false);
const hideRemoveDialog = () => setRemoveDialogVisible(false);
const [removeLoading, setRemoveLoading] = useState(false);

const [banDialogVisible, setBanDialogVisible] = useState(false);
const hideBanDialog = () => setBanDialogVisible(false);
const [banLoading, setBanLoading] = useState(false);

const { showDialog, showSnackBar } = useAlertContext();

Expand Down Expand Up @@ -307,23 +309,31 @@ function Index() {
content="All data will be lost when this user is removed."
visible={removeDialogVisible}
onHide={hideRemoveDialog}
buttons={["Cancel", "Remove User"]}
buttonsFunctions={[
hideRemoveDialog,
async () => {
try {
await removeUser(currentTeamId, userId);
await queryClient.removeQueries(["userInfo", userId]);
await invalidateMultipleKeys(queryClient, [
["userInfo"],
["best_attempts"],
]);
navigation.goBack();
} catch (e) {
console.log("Error removing user:", e);
hideRemoveDialog();
showDialog("Error", getErrorString(e));
}
buttons={[
{
children: "Cancel",
pressHandler: hideRemoveDialog,
},
{
children: "Remove User",
pressHandler: async () => {
setRemoveLoading(true);
try {
await removeUser(currentTeamId, userId);
await queryClient.removeQueries(["userInfo", userId]);
await invalidateMultipleKeys(queryClient, [
["userInfo"],
["best_attempts"],
]);
navigation.goBack();
} catch (e) {
console.log("Error removing user:", e);
hideRemoveDialog();
showDialog("Error", getErrorString(e));
setRemoveLoading(false);
}
},
loading: removeLoading,
},
]}
/>
Expand All @@ -333,23 +343,28 @@ function Index() {
content="Banning this user will delete all their data and prevent them from joining the team again."
visible={banDialogVisible}
onHide={hideBanDialog}
buttons={["Cancel", "Ban User"]}
buttonsFunctions={[
hideBanDialog,
async () => {
try {
await blacklistUser(currentTeamId, userId, userInfo, userEmail);
await queryClient.removeQueries(["userInfo", userId]);
await invalidateMultipleKeys(queryClient, [
["userInfo"],
["best_attempts"],
]); //invalidate cache
navigation.goBack();
} catch (e) {
console.log("Error banning user:", e);
hideBanDialog();
showDialog("Error", getErrorString(e));
}
buttons={[
{ children: "Cancel", pressHandler: hideBanDialog },
{
children: "Ban User",
pressHandler: async () => {
setBanLoading(true);
try {
await blacklistUser(currentTeamId, userId, userInfo, userEmail);
await queryClient.removeQueries(["userInfo", userId]);
await invalidateMultipleKeys(queryClient, [
["userInfo"],
["best_attempts"],
]); //invalidate cache
navigation.goBack();
} catch (e) {
console.log("Error banning user:", e);
hideBanDialog();
showDialog("Error", getErrorString(e));
setBanLoading(false);
}
},
loading: banLoading,
},
]}
/>
Expand Down
6 changes: 6 additions & 0 deletions app/segments/(team)/blacklist.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useQueryClient } from "@tanstack/react-query";
import { useState } from "react";
import { ScrollView, View } from "react-native";
import { Button, List } from "react-native-paper";
import { themeColors } from "~/Constants";
Expand All @@ -21,6 +22,8 @@ function Blacklist() {

const queryClient = useQueryClient(); // also called here for updating name

const [unbanLoading, setUnbanLoading] = useState({});

const invalidateKeys = [["blacklist"]];

if (blacklistIsLoading) return <Loading />;
Expand Down Expand Up @@ -52,10 +55,13 @@ function Blacklist() {
>
<Button
onPress={async () => {
setUnbanLoading({ ...unbanLoading, [userId]: true });
await removeBlacklist(currentTeamId, userId);
await invalidateMultipleKeys(queryClient, invalidateKeys);
setUnbanLoading({ ...unbanLoading, [userId]: false });
}}
textColor={themeColors.accent}
loading={unbanLoading[userId]}
>
Unban
</Button>
Expand Down
Loading
Loading