260508_14_ENH: 새로고침 시 로그인 풀리는 문제 수정 중
This commit is contained in:
@@ -65,15 +65,6 @@ export const createLocalStorageAtom = <T>(
|
||||
},
|
||||
);
|
||||
|
||||
persistentAtom.onMount = (setAtom) => {
|
||||
if (typeof window === "undefined" || wasOverridden) return;
|
||||
|
||||
const stored = getLocalStorage(key);
|
||||
if (stored && typeof stored === "object") {
|
||||
setAtom(stored as T);
|
||||
}
|
||||
};
|
||||
|
||||
return persistentAtom;
|
||||
}
|
||||
|
||||
@@ -113,14 +104,5 @@ export const createSessionStorageAtom = <T>(
|
||||
},
|
||||
);
|
||||
|
||||
persistentAtom.onMount = (setAtom) => {
|
||||
if (typeof window === "undefined") return;
|
||||
|
||||
const stored = getSessionStorage(key);
|
||||
if (stored && typeof stored === "object") {
|
||||
setAtom(stored as T);
|
||||
}
|
||||
};
|
||||
|
||||
return persistentAtom;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user