perf: default prompt

This commit is contained in:
archer
2023-08-23 16:20:53 +08:00
parent 6c70f0601d
commit a3c4a856fa
4 changed files with 27 additions and 31 deletions

View File

@@ -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 (

View File

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