File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 1- import { Suspense } from 'react' ;
2- import LoginForm from './LoginForm' ;
1+ import dynamic from 'next/dynamic' ;
2+
3+ const LoginForm = dynamic ( ( ) => import ( './LoginForm' ) , {
4+ ssr : false ,
5+ loading : ( ) => (
6+ < div className = "bg-slate-800 rounded-lg shadow-lg p-8 animate-pulse" >
7+ < div className = "space-y-6" >
8+ < div className = "h-10 bg-gray-700 rounded" />
9+ < div className = "h-10 bg-gray-700 rounded" />
10+ < div className = "h-12 bg-gray-700 rounded" />
11+ </ div >
12+ </ div >
13+ ) ,
14+ } ) ;
315
416export default function LoginPage ( ) {
517 return (
@@ -14,17 +26,7 @@ export default function LoginPage() {
1426 </ p >
1527 </ div >
1628
17- < Suspense fallback = {
18- < div className = "bg-slate-800 rounded-lg shadow-lg p-8 animate-pulse" >
19- < div className = "space-y-6" >
20- < div className = "h-10 bg-gray-700 rounded" />
21- < div className = "h-10 bg-gray-700 rounded" />
22- < div className = "h-12 bg-gray-700 rounded" />
23- </ div >
24- </ div >
25- } >
26- < LoginForm />
27- </ Suspense >
29+ < LoginForm />
2830 </ div >
2931 </ div >
3032 ) ;
You can’t perform that action at this time.
0 commit comments