pl-fe: Fix persistAuth

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-11-03 20:18:07 +01:00
parent d355651813
commit 1acf505af8

View file

@ -145,7 +145,10 @@ const sanitizeState = (state: State) => {
});
};
const persistAuth = (state: State) => localStorage.setItem(STORAGE_KEY, JSON.stringify(state.delete('client').toJS()));
const persistAuth = (state: State) => {
const { client, ...data } = state.toJS();
localStorage.setItem(STORAGE_KEY, JSON.stringify(data));
};
const persistSession = (state: State) => {
const me = state.me;