This commit is contained in:
Minseo Lee 2024-08-29 16:37:18 +09:00
parent 0d387a6d90
commit 2a04809a91
3 changed files with 13 additions and 23 deletions

View file

@ -1,7 +1,7 @@
import { useEffect } from 'react';
import { httpGet, setItem } from 'next-basics';
import { LOCALE_CONFIG } from 'lib/constants';
import { getDateLocale, getTextDirection, getMaxInt } from 'lib/lang';
import { getDateLocale, getTextDirection } from 'lib/lang';
import useStore, { setLocale } from 'store/app';
import { useForceUpdate } from './useForceUpdate';
@ -14,7 +14,6 @@ export function useLocale() {
const forceUpdate = useForceUpdate();
const dir = getTextDirection(locale);
const dateLocale = getDateLocale(locale);
const maxInt = getMaxInt(locale);
async function loadMessages(locale: string) {
const { ok, data } = await httpGet(
@ -57,7 +56,7 @@ export function useLocale() {
}
}, []);
return { locale, saveLocale, messages, dir, dateLocale, maxInt };
return { locale, saveLocale, messages, dir, dateLocale };
}
export default useLocale;