Mark completedForDevice prior to creating an account
This commit is contained in:
@@ -308,6 +308,15 @@ export function useSubmitSignup() {
|
|||||||
dispatch({type: 'setIsLoading', value: true})
|
dispatch({type: 'setIsLoading', value: true})
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
/**
|
||||||
|
* Marks any active policy update as completed, since user just agreed
|
||||||
|
* to TOS/privacy during sign up.
|
||||||
|
*
|
||||||
|
* THIS MUST RUN BEFORE createAccount, which will re-render the whole
|
||||||
|
* app with the new account.
|
||||||
|
*/
|
||||||
|
preemptivelyCompleteActivePolicyUpdate()
|
||||||
|
|
||||||
await createAccount(
|
await createAccount(
|
||||||
{
|
{
|
||||||
service: state.serviceUrl,
|
service: state.serviceUrl,
|
||||||
@@ -328,12 +337,6 @@ export function useSubmitSignup() {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
|
||||||
* Marks any active policy update as completed, since user just agreed
|
|
||||||
* to TOS/privacy during sign up
|
|
||||||
*/
|
|
||||||
preemptivelyCompleteActivePolicyUpdate()
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Must happen last so that if the user has multiple tabs open and
|
* Must happen last so that if the user has multiple tabs open and
|
||||||
* createAccount fails, one tab is not stuck in onboarding — Eric
|
* createAccount fails, one tab is not stuck in onboarding — Eric
|
||||||
|
|||||||
Reference in New Issue
Block a user