File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"use client"
22
3- import { SignInForm } from '@/components/auth/sign-in-form'
3+ import { SignInFormWrapper } from '@/components/auth/sign-in-form-wrapper '
44import { ThemeToggle } from '@/components/shared/theme-toggle'
55import Link from 'next/link'
66import Image from 'next/image'
@@ -81,7 +81,7 @@ export default function LoginPage() {
8181 animate = { { opacity : 1 , y : 0 } }
8282 transition = { { duration : 0.6 , delay : 0.5 } }
8383 >
84- < SignInForm />
84+ < SignInFormWrapper />
8585 </ motion . div >
8686
8787 < motion . div
Original file line number Diff line number Diff line change 11"use client"
22
3- import { SignUpForm } from '@/components/auth/sign-up-form'
3+ import { SignUpFormWrapper } from '@/components/auth/sign-up-form-wrapper '
44import { ThemeToggle } from '@/components/shared/theme-toggle'
55import Link from 'next/link'
66import Image from 'next/image'
@@ -81,7 +81,7 @@ export default function SignupPage() {
8181 animate = { { opacity : 1 , y : 0 } }
8282 transition = { { duration : 0.6 , delay : 0.5 } }
8383 >
84- < SignUpForm />
84+ < SignUpFormWrapper />
8585 </ motion . div >
8686
8787 < motion . div
Original file line number Diff line number Diff line change 11'use client'
22
3- import { useEffect , useRef } from 'react'
3+ import { useEffect , useRef , Suspense } from 'react'
44import { useSearchParams } from 'next/navigation'
55
6- export default function WidgetPreviewPage ( ) {
6+ function WidgetPreviewContent ( ) {
77 const searchParams = useSearchParams ( )
88 const containerRef = useRef < HTMLDivElement > ( null )
99
@@ -81,3 +81,18 @@ export default function WidgetPreviewPage() {
8181 )
8282}
8383
84+ export default function WidgetPreviewPage ( ) {
85+ return (
86+ < Suspense fallback = {
87+ < div className = "flex items-center justify-center h-screen" >
88+ < div className = "text-center" >
89+ < h1 className = "text-2xl font-bold mb-2" > Widget Preview</ h1 >
90+ < p className = "text-muted-foreground" > Loading...</ p >
91+ </ div >
92+ </ div >
93+ } >
94+ < WidgetPreviewContent />
95+ </ Suspense >
96+ )
97+ }
98+
Original file line number Diff line number Diff line change 1+ 'use client'
2+
3+ import { Suspense } from 'react'
4+ import { SignInForm } from './sign-in-form'
5+
6+ export function SignInFormWrapper ( ) {
7+ return (
8+ < Suspense fallback = {
9+ < div className = "space-y-4" >
10+ < div className = "h-10 bg-muted animate-pulse rounded" />
11+ < div className = "h-10 bg-muted animate-pulse rounded" />
12+ < div className = "h-10 bg-muted animate-pulse rounded" />
13+ </ div >
14+ } >
15+ < SignInForm />
16+ </ Suspense >
17+ )
18+ }
19+
Original file line number Diff line number Diff line change 1+ 'use client'
2+
3+ import { Suspense } from 'react'
4+ import { SignUpForm } from './sign-up-form'
5+
6+ export function SignUpFormWrapper ( ) {
7+ return (
8+ < Suspense fallback = {
9+ < div className = "space-y-4" >
10+ < div className = "h-10 bg-muted animate-pulse rounded" />
11+ < div className = "h-10 bg-muted animate-pulse rounded" />
12+ < div className = "h-10 bg-muted animate-pulse rounded" />
13+ < div className = "h-10 bg-muted animate-pulse rounded" />
14+ </ div >
15+ } >
16+ < SignUpForm />
17+ </ Suspense >
18+ )
19+ }
20+
You can’t perform that action at this time.
0 commit comments