Skip to content

Commit

Permalink
Fix: import dynamic when build ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytc13579 committed Jan 2, 2024
1 parent ecb9801 commit 62e90a2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/blockchains/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { isProduction } from '@/config';
import MainLayout from '@/layouts/MainLayout';
import IframeTC from '@/modules/iframe-tc';
import dynamic from 'next/dynamic';

const pathUrl = '/bvm-website-sats-iframe/computers';
const IframeURLExtend =
Expand All @@ -16,6 +17,13 @@ const iframeDomain = isProduction
? 'https://bvm.network'
: 'https://dev.bvm.network';

const IframeTCDynamic = dynamic(
() => import('@/modules/iframe-tc').then((m) => m.default),
{
ssr: false,
},
);

const TCPage = () => {
return (
<MainLayout
Expand All @@ -25,7 +33,7 @@ const TCPage = () => {
bgColor: 'white',
}}
>
<IframeTC iframeURL={`${iframeDomain}${pathUrl}`} />
<IframeTCDynamic iframeURL={`${iframeDomain}${pathUrl}`} />
</MainLayout>
);
};
Expand Down

0 comments on commit 62e90a2

Please sign in to comment.