diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-08 09:04:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 09:04:06 -0800 |
commit | 4afed4be281b6319c328938e4ed757624a78b13c (patch) | |
tree | 7a7744801c2964a3981c3e3ed1772f8226276c6b /src/view/com/auth/create/CreateAccount.tsx | |
parent | 3a211017d3d972fb442069e38d1b8ff1a2edbd57 (diff) | |
download | voidsky-4afed4be281b6319c328938e4ed757624a78b13c.tar.zst |
Move onboarding state to new persistence + reducer context (#1835)
Diffstat (limited to 'src/view/com/auth/create/CreateAccount.tsx')
-rw-r--r-- | src/view/com/auth/create/CreateAccount.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/view/com/auth/create/CreateAccount.tsx b/src/view/com/auth/create/CreateAccount.tsx index 1d64cc067..c3cfb3ad3 100644 --- a/src/view/com/auth/create/CreateAccount.tsx +++ b/src/view/com/auth/create/CreateAccount.tsx @@ -15,6 +15,7 @@ import {s} from 'lib/styles' import {useStores} from 'state/index' import {CreateAccountModel} from 'state/models/ui/create-account' import {usePalette} from 'lib/hooks/usePalette' +import {useOnboardingDispatch} from '#/state/shell' import {Step1} from './Step1' import {Step2} from './Step2' @@ -29,6 +30,7 @@ export const CreateAccount = observer(function CreateAccountImpl({ const pal = usePalette('default') const store = useStores() const model = React.useMemo(() => new CreateAccountModel(store), [store]) + const onboardingDispatch = useOnboardingDispatch() React.useEffect(() => { screen('CreateAccount') @@ -59,14 +61,14 @@ export const CreateAccount = observer(function CreateAccountImpl({ model.next() } else { try { - await model.submit() + await model.submit(onboardingDispatch) } catch { // dont need to handle here } finally { track('Try Create Account') } } - }, [model, track]) + }, [model, track, onboardingDispatch]) return ( <LoggedOutLayout |