mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Refactor: removed default exports.
This commit is contained in:
parent
cd944e14ce
commit
f83a12d6cd
343 changed files with 555 additions and 1046 deletions
|
|
@ -3,7 +3,7 @@ import { httpGet } from '@/lib/fetch';
|
|||
import { setItem } from '@/lib/storage';
|
||||
import { LOCALE_CONFIG } from '@/lib/constants';
|
||||
import { getDateLocale, getTextDirection } from '@/lib/lang';
|
||||
import useStore, { setLocale } from '@/store/app';
|
||||
import { useApp, setLocale } from '@/store/app';
|
||||
import { useForceUpdate } from './useForceUpdate';
|
||||
import enUS from '../../../public/intl/country/en-US.json';
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ const messages = {
|
|||
const selector = (state: { locale: any }) => state.locale;
|
||||
|
||||
export function useLocale() {
|
||||
const locale = useStore(selector);
|
||||
const locale = useApp(selector);
|
||||
const forceUpdate = useForceUpdate();
|
||||
const dir = getTextDirection(locale);
|
||||
const dateLocale = getDateLocale(locale);
|
||||
|
|
@ -58,5 +58,3 @@ export function useLocale() {
|
|||
|
||||
return { locale, saveLocale, messages, dir, dateLocale };
|
||||
}
|
||||
|
||||
export default useLocale;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue