diff --git a/src/shared/constants/colors.ts b/src/shared/constants/colors.ts deleted file mode 100644 index 5171e91..0000000 --- a/src/shared/constants/colors.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const DEFAULT_BACKGROUND_COLOR = '#FFFFFF'; -export const HOME_BACKGROUND_COLOR = '#EEF3F8'; diff --git a/src/shared/constants/locales/kr/glossary.ts b/src/shared/constants/locales/kr/glossary.ts deleted file mode 100644 index 0325b16..0000000 --- a/src/shared/constants/locales/kr/glossary.ts +++ /dev/null @@ -1 +0,0 @@ -export const glossary = {}; diff --git a/src/shared/lib/format-korean-number.ts b/src/shared/lib/format-korean-number.ts deleted file mode 100644 index b9214ea..0000000 --- a/src/shared/lib/format-korean-number.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const formatKoreanNumber = (num: number): string => { - const units = ['', '만', '억', '조', '경', '해']; - let result = ''; - let unitIndex = 0; - - while (num > 0) { - const part = num % 10000; - if (part != 0) { - result = `${part.toLocaleString()}${units[unitIndex]}${result}`; - } - num = Math.floor(num / 10000); - unitIndex++; - } - - return result; -}; diff --git a/src/shared/lib/hooks/index.tsx b/src/shared/lib/hooks/index.tsx index bca3b46..d92c202 100644 --- a/src/shared/lib/hooks/index.tsx +++ b/src/shared/lib/hooks/index.tsx @@ -3,7 +3,5 @@ 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-location-permission'; -export * from './use-window-focus-change'; export * from './use-router-listener'; diff --git a/src/shared/lib/hooks/use-location-permission.ts b/src/shared/lib/hooks/use-location-permission.ts deleted file mode 100644 index 2c78600..0000000 --- a/src/shared/lib/hooks/use-location-permission.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-disable @cspell/spellchecker */ -import { useEffect } from 'react'; -import { PERMISSION_RESULTS, PermissionResultValues, WebViewBridgeResponse } from '@/shared/@types/webview-bridge'; - -import { NativeFunction } from '@/shared/constants/native-function'; - -interface CheckLocationPermissionResponse extends WebViewBridgeResponse { - data: PermissionResultValues; -} - -export const useRequestLocationPermission = () => { - useEffect(() => { - window.webViewBridge.send(NativeFunction.LocationPermission, { - success: async () => { - // console.log('res', res); - }, - }); - }, []); -}; - -export const useCheckLocationPermission = () => { - useEffect(() => { - window.webViewBridge.send(NativeFunction.CheckLocationPermission, { - success: async (res: CheckLocationPermissionResponse) => { - // console.log('res', res.data); - switch (res.data) { - case PERMISSION_RESULTS.UNAVAILABLE: - console.log('This feature is not available (on this device / in this context)'); - break; - case PERMISSION_RESULTS.DENIED: - console.log('The permission has not been requested / is denied but requestable'); - break; - case PERMISSION_RESULTS.LIMITED: - console.log('The permission is limited: some actions are possible'); - break; - case PERMISSION_RESULTS.GRANTED: - console.log('The permission is granted'); - break; - case PERMISSION_RESULTS.BLOCKED: - console.log('The permission is denied and not requestable anymore'); - break; - } - }, - }); - }, []); -}; diff --git a/src/shared/lib/hooks/use-window-focus-change.ts b/src/shared/lib/hooks/use-window-focus-change.ts deleted file mode 100644 index 77955e8..0000000 --- a/src/shared/lib/hooks/use-window-focus-change.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-disable react-hooks/exhaustive-deps */ -import { useEffect } from 'react'; - -interface WindowFocusProps { - onFocus?: () => void; - onBlur?: () => void; - args?: any[]; -} - -export const useWindowFocusChange = ({ onFocus, onBlur, ...args }: WindowFocusProps) => { - const dependencies: any[] = []; - if (Array.isArray(args)) { - dependencies.push(...args); - } - const handleEvent = () => { - if (document.hidden) { - // the page is hidden - onBlur?.(); - } else { - // the page is visible - onFocus?.(); - } - }; - useEffect(() => { - window.document.addEventListener('visibilitychange', handleEvent); - return () => window.document.removeEventListener('visibilitychange', handleEvent); - }, [onFocus, onBlur, ...dependencies]); -}; diff --git a/src/shared/lib/index.ts b/src/shared/lib/index.ts index 6d3fd95..a1fb8c7 100644 --- a/src/shared/lib/index.ts +++ b/src/shared/lib/index.ts @@ -1,4 +1,3 @@ export * from './error'; export * from './toast'; -export * from './web-view-bridge'; -export * from './format-korean-number'; +export * from './web-view-bridge'; \ No newline at end of file