From e0f767b2b6fecc4cdbfbfd2fabd4683852f35f55 Mon Sep 17 00:00:00 2001 From: "focp212@naver.com" Date: Tue, 4 Nov 2025 11:31:21 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/hooks/index.tsx | 2 -- src/app/hooks/use-redirect.ts | 17 ----------- src/shared/constants/local-storage.ts | 19 +----------- src/shared/lib/hooks/index.tsx | 2 -- src/shared/lib/hooks/use-device-uid.ts | 31 -------------------- src/shared/lib/hooks/use-has-bio-hardware.ts | 7 ----- 6 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 src/app/hooks/use-redirect.ts delete mode 100644 src/shared/lib/hooks/use-device-uid.ts delete mode 100644 src/shared/lib/hooks/use-has-bio-hardware.ts diff --git a/src/app/hooks/index.tsx b/src/app/hooks/index.tsx index c6f383c..904f1ce 100644 --- a/src/app/hooks/index.tsx +++ b/src/app/hooks/index.tsx @@ -1,4 +1,2 @@ -/* eslint-disable react-refresh/only-export-components */ -export * from './use-redirect'; export * from './use-init-theme'; diff --git a/src/app/hooks/use-redirect.ts b/src/app/hooks/use-redirect.ts deleted file mode 100644 index cf53fb9..0000000 --- a/src/app/hooks/use-redirect.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable react-hooks/exhaustive-deps */ -import { useEffect } from 'react'; -import { useNavigate } from 'react-router'; -import { StorageKeys } from '@/shared/constants/local-storage'; -import useLocalStorageState from 'use-local-storage-state'; - -export const useRedirect = () => { - const navigate = useNavigate(); - const [path, , { removeItem }] = useLocalStorageState(StorageKeys.RedirectPath); - - useEffect(() => { - if(path){ - // navigate(path); - removeItem(); - } - }, [path]); -}; diff --git a/src/shared/constants/local-storage.ts b/src/shared/constants/local-storage.ts index 8a0895d..7eced1c 100644 --- a/src/shared/constants/local-storage.ts +++ b/src/shared/constants/local-storage.ts @@ -15,21 +15,4 @@ export enum StorageKeys { AppVersion = 'APP_VERSION', LogOut = 'LOGOUT', - requestId = 'REQUEST_ID', - - Jwt = 'JWT', - RequestId = 'REQUEST_ID', - - HasBioHardware = 'HAS_BIO_HARDWARE', - DeviceUniqueId = 'DEVICE_UNIQUE_ID', - - AppColor = 'APP_COLOR', - RedirectPath = 'REDIRECT_PATH', - Platform = 'PLATFORM', - ScannedQrCode = 'SCANNED_QR_CODE', - HasPushTokenSent = 'HAS_PUSH_TOKEN_SENT', - SetFont = 'SET_FONT', - - - -} +}; diff --git a/src/shared/lib/hooks/index.tsx b/src/shared/lib/hooks/index.tsx index d92c202..8ff914c 100644 --- a/src/shared/lib/hooks/index.tsx +++ b/src/shared/lib/hooks/index.tsx @@ -1,7 +1,5 @@ export * from './use-navigate'; -export * from './use-device-uid'; export * from './use-fix-scroll-view-safari'; -export * from './use-has-bio-hardware'; export * from './use-navigate'; export * from './use-router-listener'; diff --git a/src/shared/lib/hooks/use-device-uid.ts b/src/shared/lib/hooks/use-device-uid.ts deleted file mode 100644 index ba4cab1..0000000 --- a/src/shared/lib/hooks/use-device-uid.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* eslint-disable react-hooks/exhaustive-deps */ -/* eslint-disable @cspell/spellchecker */ -import { useEffect } from 'react'; - -import useLocalStorageState from 'use-local-storage-state'; -// import { useUpdateUserInfo } from '@/entities/user/lib/use-update-user-info'; -import { StorageKeys } from '@/shared/constants/local-storage'; -import { useStore } from '@/shared/model/store'; - -export const useDeviceUid = () => { - let defaultUid = ''; - if (!window.ReactNativeWebView) { - defaultUid = '1234567890'; - } - const userInfo = useStore((state: any) => state.userSlice.userInfo); - const [deviceUid] = useLocalStorageState(StorageKeys.DeviceUniqueId, { defaultValue: defaultUid }); - //const { updateUserInfo } = useUpdateUserInfo(); - - useEffect(() => { - if (deviceUid.length < 1) { - return; - } - if (userInfo?.appEsntlNo && userInfo?.appEsntlNo?.length > 0) { - return; - } - - // updateUserInfo((prev: any) => ({ ...prev, appEsntlNo: deviceUid })); - }, [deviceUid]); - - return deviceUid; -}; diff --git a/src/shared/lib/hooks/use-has-bio-hardware.ts b/src/shared/lib/hooks/use-has-bio-hardware.ts deleted file mode 100644 index bf291c6..0000000 --- a/src/shared/lib/hooks/use-has-bio-hardware.ts +++ /dev/null @@ -1,7 +0,0 @@ -import useLocalStorageState from 'use-local-storage-state'; -import { StorageKeys } from '@/shared/constants/local-storage'; - -export const useHasBioHardware = () => { - const [hasBioHardware] = useLocalStorageState(StorageKeys.HasBioHardware, { defaultValue: false }); - return hasBioHardware; -};