Merge branch 'fix-unauth' into 'main'
[ProtonMail-WebClient.git] / packages / account / securityCheckup / restoreSecurityCheckupSession.ts
blob03e02a4063620ea18d8f6099f6578fe16ee5c589
1 import type { ProtonDispatch } from '@proton/redux-shared-store-types';
3 import { getSecurityCheckupSessionItem } from './helpers/securityCheckupSessionStorage';
4 import { securityCheckupSlice } from './slice';
6 const restoreSecurityCheckupSession = ({ dispatch, userId }: { dispatch: ProtonDispatch<any>; userId: string }) => {
7     const persistedSecurityCheckupSession = getSecurityCheckupSessionItem(userId);
9     dispatch(securityCheckupSlice.actions.setSession({ session: persistedSecurityCheckupSession }));
12 export default restoreSecurityCheckupSession;