-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
12 changed files
with
165 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/mobile/src/screens/sign-on-screen/screens/AccountLoadingScreen.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// This loading page shows up when the users account is still being created either due to slow creation or a fast user | ||
|
||
import { useEffect } from 'react' | ||
|
||
import { getStatus } from 'audius-client/src/common/store/pages/signon/selectors' | ||
import { EditingStatus } from 'audius-client/src/common/store/pages/signon/types' | ||
import { useSelector } from 'react-redux' | ||
|
||
import { Flex } from '@audius/harmony-native' | ||
import LoadingSpinner from 'app/components/loading-spinner' | ||
import { useNavigation } from 'app/hooks/useNavigation' | ||
|
||
import { Heading, Page } from '../components/layout' | ||
|
||
const messages = { | ||
heading: 'Your Account is Almost Ready to Rock 🤘', | ||
description: "We're just finishing up a few things..." | ||
} | ||
|
||
// The user just waits here until the account is created and before being shown the welcome modal on the trending page | ||
export const AccountLoadingScreen = () => { | ||
const navigation = useNavigation() | ||
|
||
const accountCreationStatus = useSelector(getStatus) | ||
|
||
useEffect(() => { | ||
if (accountCreationStatus === EditingStatus.SUCCESS) { | ||
navigation.navigate('HomeStack', { screen: 'Trending' }) | ||
} | ||
}, [accountCreationStatus, navigation]) | ||
|
||
return ( | ||
<Page gap='3xl' justifyContent='center' alignItems='center' pb='3xl'> | ||
<LoadingSpinner style={{ height: 36, width: 36 }} /> | ||
<Flex justifyContent='center'> | ||
<Heading | ||
heading={messages.heading} | ||
description={messages.description} | ||
centered | ||
/> | ||
</Flex> | ||
</Page> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters