perf: default prompt
This commit is contained in:
@@ -10,7 +10,7 @@ import NProgress from 'nprogress'; //nprogress module
|
||||
import Router from 'next/router';
|
||||
import { clientInitData, feConfigs } from '@/store/static';
|
||||
import { appWithTranslation, useTranslation } from 'next-i18next';
|
||||
import { getLangStore } from '@/utils/i18n';
|
||||
import { getLangStore, setLangStore } from '@/utils/i18n';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
import 'nprogress/nprogress.css';
|
||||
@@ -58,6 +58,7 @@ function App({ Component, pageProps }: AppProps) {
|
||||
useEffect(() => {
|
||||
const lang = getLangStore() || 'zh';
|
||||
i18n?.changeLanguage?.(lang);
|
||||
setLangStore(lang);
|
||||
}, [router.asPath]);
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,18 +14,10 @@ import { serviceSideProps } from '@/utils/i18n';
|
||||
import { feConfigs } from '@/store/static';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const Promotion = dynamic(() => import('./components/Promotion'), {
|
||||
ssr: false
|
||||
});
|
||||
const BillTable = dynamic(() => import('./components/BillTable'), {
|
||||
ssr: false
|
||||
});
|
||||
const PayRecordTable = dynamic(() => import('./components/PayRecordTable'), {
|
||||
ssr: false
|
||||
});
|
||||
const InformTable = dynamic(() => import('./components/InformTable'), {
|
||||
ssr: false
|
||||
});
|
||||
const Promotion = dynamic(() => import('./components/Promotion'));
|
||||
const BillTable = dynamic(() => import('./components/BillTable'));
|
||||
const PayRecordTable = dynamic(() => import('./components/PayRecordTable'));
|
||||
const InformTable = dynamic(() => import('./components/InformTable'));
|
||||
|
||||
enum TabEnum {
|
||||
'info' = 'info',
|
||||
|
||||
Reference in New Issue
Block a user