move onboarding to screens
This commit is contained in:
parent
84e065667a
commit
edfd326069
11 changed files with 149 additions and 107 deletions
|
@ -31,7 +31,7 @@ const POLL_FREQ = 30e3 // 30sec
|
|||
|
||||
type Props = NativeStackScreenProps<HomeTabNavigatorParams, 'Home'>
|
||||
export const HomeScreen = withAuthRequired(
|
||||
observer((_opts: Props) => {
|
||||
observer(({navigation}: Props) => {
|
||||
const store = useStores()
|
||||
const pagerRef = React.useRef<PagerRef>(null)
|
||||
const [selectedPage, setSelectedPage] = React.useState(0)
|
||||
|
@ -40,6 +40,12 @@ export const HomeScreen = withAuthRequired(
|
|||
string[]
|
||||
>([])
|
||||
|
||||
React.useEffect(() => {
|
||||
if (store.onboarding.isRemaining) {
|
||||
navigation.navigate('Welcome')
|
||||
}
|
||||
}, [store.onboarding.isRemaining, navigation])
|
||||
|
||||
React.useEffect(() => {
|
||||
const {pinned} = store.me.savedFeeds
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue