From c3e6fc0064e3ef8c737a26850c0ba1121d3d8ea5 Mon Sep 17 00:00:00 2001
From: bluecloud <96812901+pitb2022@users.noreply.github.com>
Date: Wed, 4 Sep 2024 17:10:30 +0800
Subject: [PATCH] fix(CampaignDetail): disable SSR at SideParticipants
---
src/views/CampaignDetail/index.tsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/views/CampaignDetail/index.tsx b/src/views/CampaignDetail/index.tsx
index a10039114a..9248a45153 100644
--- a/src/views/CampaignDetail/index.tsx
+++ b/src/views/CampaignDetail/index.tsx
@@ -1,4 +1,5 @@
import { useQuery } from '@apollo/react-hooks'
+import dynamic from 'next/dynamic'
import { useContext } from 'react'
import { toPath } from '~/common/utils'
@@ -17,7 +18,11 @@ import { CampaignDetailQuery } from '~/gql/graphql'
import ArticleFeeds from './ArticleFeeds'
import { CAMPAIGN_DETAIL } from './gql'
import InfoHeader from './InfoHeader'
-import SideParticipants from './SideParticipants'
+
+const DynamicSideParticipants = dynamic(() => import('./SideParticipants'), {
+ loading: () => ,
+ ssr: false,
+})
const CampaignDetail = () => {
const { lang } = useContext(LanguageContext)
@@ -58,7 +63,7 @@ const CampaignDetail = () => {
const path = toPath({ page: 'campaignDetail', campaign })
return (
- }>
+ }>