diff options
Diffstat (limited to 'src/state/shell/onboarding.tsx')
-rw-r--r-- | src/state/shell/onboarding.tsx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/state/shell/onboarding.tsx b/src/state/shell/onboarding.tsx index 5963cc50e..6a18b461f 100644 --- a/src/state/shell/onboarding.tsx +++ b/src/state/shell/onboarding.tsx @@ -82,12 +82,16 @@ export function Provider({children}: React.PropsWithChildren<{}>) { React.useEffect(() => { return persisted.onUpdate(() => { - dispatch({ - type: 'set', - step: persisted.get('onboarding').step as OnboardingStep, - }) + const next = persisted.get('onboarding').step + // TODO we've introduced a footgun + if (state.step !== next) { + dispatch({ + type: 'set', + step: persisted.get('onboarding').step as OnboardingStep, + }) + } }) - }, [dispatch]) + }, [state, dispatch]) return ( <stateContext.Provider value={state}> |