불필요 파일 제거
This commit is contained in:
@@ -1,4 +1,2 @@
|
|||||||
/* eslint-disable react-refresh/only-export-components */
|
|
||||||
export * from './use-redirect';
|
|
||||||
export * from './use-init-theme';
|
export * from './use-init-theme';
|
||||||
|
|
||||||
|
|||||||
@@ -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]);
|
|
||||||
};
|
|
||||||
@@ -15,21 +15,4 @@ export enum StorageKeys {
|
|||||||
AppVersion = 'APP_VERSION',
|
AppVersion = 'APP_VERSION',
|
||||||
LogOut = 'LOGOUT',
|
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',
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
export * from './use-navigate';
|
export * from './use-navigate';
|
||||||
export * from './use-device-uid';
|
|
||||||
export * from './use-fix-scroll-view-safari';
|
export * from './use-fix-scroll-view-safari';
|
||||||
export * from './use-has-bio-hardware';
|
|
||||||
export * from './use-navigate';
|
export * from './use-navigate';
|
||||||
export * from './use-router-listener';
|
export * from './use-router-listener';
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
|
||||||
};
|
|
||||||
@@ -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;
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user