fix: ssr close

This commit is contained in:
archer
2023-06-25 14:16:54 +08:00
parent 9eed321471
commit 68eca25df4
4 changed files with 9 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ interface Props {
export function useScreen(data?: Props) { export function useScreen(data?: Props) {
const { defaultIsPc = false } = data || {}; const { defaultIsPc = false } = data || {};
const [isPc] = useMediaQuery('(min-width: 900px)', { const [isPc] = useMediaQuery('(min-width: 900px)', {
ssr: true, ssr: false,
fallback: defaultIsPc fallback: defaultIsPc
}); });

View File

@@ -12,10 +12,10 @@ import { MyModelsTypeEnum } from '@/constants/user';
import dynamic from 'next/dynamic'; import dynamic from 'next/dynamic';
const Avatar = dynamic(() => import('@/components/Avatar'), { const Avatar = dynamic(() => import('@/components/Avatar'), {
ssr: true ssr: false
}); });
const Tabs = dynamic(() => import('@/components/Tabs'), { const Tabs = dynamic(() => import('@/components/Tabs'), {
ssr: true ssr: false
}); });
const ModelList = ({ modelId }: { modelId: string }) => { const ModelList = ({ modelId }: { modelId: string }) => {

View File

@@ -5,7 +5,7 @@ import dynamic from 'next/dynamic';
import MyIcon from '@/components/Icon'; import MyIcon from '@/components/Icon';
const APIKeyModal = dynamic(() => import('@/components/APIKeyModal'), { const APIKeyModal = dynamic(() => import('@/components/APIKeyModal'), {
ssr: true ssr: false
}); });
const API = ({ modelId }: { modelId: string }) => { const API = ({ modelId }: { modelId: string }) => {

View File

@@ -23,21 +23,21 @@ import Tabs from '@/components/Tabs';
import BillTable from './components/BillTable'; import BillTable from './components/BillTable';
const PayRecordTable = dynamic(() => import('./components/PayRecordTable'), { const PayRecordTable = dynamic(() => import('./components/PayRecordTable'), {
ssr: true ssr: false
}); });
const PromotionTable = dynamic(() => import('./components/PromotionTable'), { const PromotionTable = dynamic(() => import('./components/PromotionTable'), {
ssr: true ssr: false
}); });
const InformTable = dynamic(() => import('./components/InformTable'), { const InformTable = dynamic(() => import('./components/InformTable'), {
ssr: true ssr: false
}); });
const PayModal = dynamic(() => import('./components/PayModal'), { const PayModal = dynamic(() => import('./components/PayModal'), {
loading: () => <Loading fixed={false} />, loading: () => <Loading fixed={false} />,
ssr: true ssr: false
}); });
const WxConcat = dynamic(() => import('@/components/WxConcat'), { const WxConcat = dynamic(() => import('@/components/WxConcat'), {
loading: () => <Loading fixed={false} />, loading: () => <Loading fixed={false} />,
ssr: true ssr: false
}); });
enum TableEnum { enum TableEnum {