From 68eca25df43dd915cfda44e4d6252525e63b648c Mon Sep 17 00:00:00 2001
From: archer <545436317@qq.com>
Date: Sun, 25 Jun 2023 14:16:54 +0800
Subject: [PATCH] fix: ssr close
---
client/src/hooks/useScreen.ts | 2 +-
client/src/pages/model/components/ModelList.tsx | 4 ++--
.../pages/model/components/detail/components/API.tsx | 2 +-
client/src/pages/number/index.tsx | 10 +++++-----
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/client/src/hooks/useScreen.ts b/client/src/hooks/useScreen.ts
index acd63f962..e7087cfd3 100644
--- a/client/src/hooks/useScreen.ts
+++ b/client/src/hooks/useScreen.ts
@@ -8,7 +8,7 @@ interface Props {
export function useScreen(data?: Props) {
const { defaultIsPc = false } = data || {};
const [isPc] = useMediaQuery('(min-width: 900px)', {
- ssr: true,
+ ssr: false,
fallback: defaultIsPc
});
diff --git a/client/src/pages/model/components/ModelList.tsx b/client/src/pages/model/components/ModelList.tsx
index 9e191912e..c06b7b45f 100644
--- a/client/src/pages/model/components/ModelList.tsx
+++ b/client/src/pages/model/components/ModelList.tsx
@@ -12,10 +12,10 @@ import { MyModelsTypeEnum } from '@/constants/user';
import dynamic from 'next/dynamic';
const Avatar = dynamic(() => import('@/components/Avatar'), {
- ssr: true
+ ssr: false
});
const Tabs = dynamic(() => import('@/components/Tabs'), {
- ssr: true
+ ssr: false
});
const ModelList = ({ modelId }: { modelId: string }) => {
diff --git a/client/src/pages/model/components/detail/components/API.tsx b/client/src/pages/model/components/detail/components/API.tsx
index 40ace07b1..0b805112e 100644
--- a/client/src/pages/model/components/detail/components/API.tsx
+++ b/client/src/pages/model/components/detail/components/API.tsx
@@ -5,7 +5,7 @@ import dynamic from 'next/dynamic';
import MyIcon from '@/components/Icon';
const APIKeyModal = dynamic(() => import('@/components/APIKeyModal'), {
- ssr: true
+ ssr: false
});
const API = ({ modelId }: { modelId: string }) => {
diff --git a/client/src/pages/number/index.tsx b/client/src/pages/number/index.tsx
index 67ca3298c..66f4661e7 100644
--- a/client/src/pages/number/index.tsx
+++ b/client/src/pages/number/index.tsx
@@ -23,21 +23,21 @@ import Tabs from '@/components/Tabs';
import BillTable from './components/BillTable';
const PayRecordTable = dynamic(() => import('./components/PayRecordTable'), {
- ssr: true
+ ssr: false
});
const PromotionTable = dynamic(() => import('./components/PromotionTable'), {
- ssr: true
+ ssr: false
});
const InformTable = dynamic(() => import('./components/InformTable'), {
- ssr: true
+ ssr: false
});
const PayModal = dynamic(() => import('./components/PayModal'), {
loading: () => ,
- ssr: true
+ ssr: false
});
const WxConcat = dynamic(() => import('@/components/WxConcat'), {
loading: () => ,
- ssr: true
+ ssr: false
});
enum TableEnum {