diff --git a/native/backup/backup-handler.js b/native/backup/backup-handler.js --- a/native/backup/backup-handler.js +++ b/native/backup/backup-handler.js @@ -25,10 +25,8 @@ import { useMigrationToNewFlow } from './use-migration-to-new-flow.js'; import { commCoreModule } from '../native-modules.js'; import { useSelector } from '../redux/redux-utils.js'; -import { useStaffCanSee } from '../utils/staff-utils.js'; function BackupHandler(): null { - const staffCanSee = useStaffCanSee(); const { showAlertToStaff } = useStaffAlert(); const getCurrentIdentityUserState = useCurrentIdentityUserState(); @@ -208,7 +206,7 @@ ]); React.useEffect(() => { - if (!staffCanSee || !persistedStateLoaded) { + if (!usingRestoreFlow || !persistedStateLoaded) { return; } @@ -219,7 +217,7 @@ completionRef.current.required = false; void process(); } - }, [persistedStateLoaded, process, renderCount, staffCanSee]); + }, [persistedStateLoaded, process, renderCount, usingRestoreFlow]); return null; }