From 3a19a84962b15141413edc2b0e5921cbd0206658 Mon Sep 17 00:00:00 2001 From: degradin Date: Sun, 16 Mar 2025 13:07:55 +0300 Subject: [PATCH] client reqs --- app/components/DynamicMainApp.tsx | 22 ++++++++++++++++++++++ app/page.tsx | 19 ++----------------- 2 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 app/components/DynamicMainApp.tsx diff --git a/app/components/DynamicMainApp.tsx b/app/components/DynamicMainApp.tsx new file mode 100644 index 0000000..4a1e024 --- /dev/null +++ b/app/components/DynamicMainApp.tsx @@ -0,0 +1,22 @@ +'use client'; + +import dynamic from 'next/dynamic'; +import { Center, Spinner } from '@chakra-ui/react'; +import ClientOnly from './ClientOnly'; + +const MainApp = dynamic(() => import('./MainApp'), { + ssr: false, + loading: () => ( +
+ +
+ ), +}); + +export default function DynamicMainApp() { + return ( + + + + ); +} \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index 340ad81..956f1b8 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,20 +1,5 @@ -import dynamic from 'next/dynamic'; -import { Center, Spinner } from '@chakra-ui/react'; -import ClientOnly from './components/ClientOnly'; - -const MainApp = dynamic(() => import('./components/MainApp'), { - ssr: false, - loading: () => ( -
- -
- ), -}); +import DynamicMainApp from './components/DynamicMainApp'; export default function Home() { - return ( - - - - ); + return ; } \ No newline at end of file