불필요 파일 제거

This commit is contained in:
focp212@naver.com
2025-10-30 15:53:57 +09:00
parent 0736c00a87
commit bfcea1913d
7 changed files with 1 additions and 97 deletions

View File

@@ -1,2 +0,0 @@
export const DEFAULT_BACKGROUND_COLOR = '#FFFFFF';
export const HOME_BACKGROUND_COLOR = '#EEF3F8';

View File

@@ -1 +0,0 @@
export const glossary = {};

View File

@@ -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;
};

View File

@@ -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';

View File

@@ -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;
}
},
});
}, []);
};

View File

@@ -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]);
};

View File

@@ -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';