Skip to content
Closed
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions mobile/screens/onboarding/WaitingForVerification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ const WaitingForVerification = ({

// Run reloadUserState when the screen is mounted
useEffect(() => {
reloadUserState();
if (state.id) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should never be undefined.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state.id is defined when a user is logged in. And this screen should only be visible when the user is logged in.

reloadUserState();
}
}, []);

const openVerificationCallPDF = async () => {
Expand Down Expand Up @@ -101,7 +103,9 @@ const WaitingForVerification = ({
};

return (
<OPageColorContainer refreshFunc={reloadUserState}>
<OPageColorContainer
refreshFunc={state.id ? reloadUserState : undefined}
>
<View style={styles.btnContainer}>
<View style={styles.verificationTextContainer}>
<Text style={styles.verificationInProgress}>
Expand Down
Loading