From 4c4ef662fdc1a95ce9bc537840fb6d2b0daa01f9 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Fri, 8 May 2026 10:32:58 +0900 Subject: [PATCH] =?UTF-8?q?260508=5F03=5FENH:=20=EC=83=88=EB=A1=9C?= =?UTF-8?q?=EA=B3=A0=EC=B9=A8=20=EC=8B=9C=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=ED=92=80=EB=A6=AC=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/security.ts | 2 +- src/store/jotai/utils.ts | 20 +------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/lib/security.ts b/src/lib/security.ts index fb47dd1..752fdfa 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -1,7 +1,7 @@ import CryptoJS from "crypto-js"; const KEY = CryptoJS.enc.Utf8.parse("kr!-Kfp@-fr0nT-CrypT0-Key-STR"); -const IV = CryptoJS.enc.Utf8.parse("kr!-Kfp@-IVST"); +const IV = CryptoJS.enc.Utf8.parse("kr!-Kfp@Dash-IV"); export type WordArray = CryptoJS.lib.WordArray; diff --git a/src/store/jotai/utils.ts b/src/store/jotai/utils.ts index 5c7ac51..0a5a716 100644 --- a/src/store/jotai/utils.ts +++ b/src/store/jotai/utils.ts @@ -41,15 +41,6 @@ export const createLocalStorageAtom = ( // 하이드레이션(저장소 주입)과 사용자 set 경합 방지용 플래그 let wasOverridden = false; // 마운트 이후 사용자가 값을 쓴 적이 있는지 - baseAtom.onMount = (setAtom) => { - if (typeof window === "undefined" || wasOverridden) return; - - const stored = getLocalStorage(key); - if (stored && typeof stored === "object") { - setAtom(stored as T); - } - }; - const persistentAtom = atom( (get) => get(baseAtom), (get, set, update: T | ((prev: T) => T)) => { @@ -89,15 +80,6 @@ export const createSessionStorageAtom = ( const realInitialValue = loadInitialState("session", key, initialValue); const baseAtom: PrimitiveAtom = atom(realInitialValue); - baseAtom.onMount = (setAtom) => { - if (typeof window === "undefined") return; - - const stored = getSessionStorage(key); - if (stored && typeof stored === "object") { - setAtom(stored as T); - } - }; - const persistentAtom = atom( (get) => get(baseAtom), (get, set, update: T | ((prev: T) => T)) => { @@ -123,4 +105,4 @@ export const createSessionStorageAtom = ( ); return persistentAtom; -} +} \ No newline at end of file