Skip to content

Commit 85c21a2

Browse files
committed
fix build error with useSearchParam not wrapped in suspense
1 parent ec5ec9d commit 85c21a2

File tree

1 file changed

+27
-2
lines changed
  • packages/web/src/app/login/verify

1 file changed

+27
-2
lines changed

packages/web/src/app/login/verify/page.tsx

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { Card, CardHeader, CardDescription, CardTitle, CardContent, CardFooter }
88
import { Button } from "@/components/ui/button"
99
import { ArrowLeft } from "lucide-react"
1010
import { useRouter, useSearchParams } from "next/navigation"
11-
import { useCallback, useState } from "react"
11+
import { useCallback, useState, Suspense } from "react"
1212
import VerificationFailed from "./verificationFailed"
1313
import { SourcebotLogo } from "@/app/components/sourcebotLogo"
1414
import useCaptureEvent from "@/hooks/useCaptureEvent"
1515

16-
export default function VerifyPage() {
16+
function VerifyPageContent() {
1717
const [value, setValue] = useState("")
1818
const searchParams = useSearchParams()
1919
const email = searchParams.get("email")
@@ -97,3 +97,28 @@ export default function VerifyPage() {
9797
)
9898
}
9999

100+
function LoadingVerifyPage() {
101+
return (
102+
<div className="min-h-screen flex flex-col items-center justify-center p-4 bg-gradient-to-b from-background to-muted/30">
103+
<div className="w-full max-w-md">
104+
<div className="flex justify-center mb-6">
105+
<SourcebotLogo className="h-16" size="large" />
106+
</div>
107+
<Card className="w-full shadow-lg border-muted/40">
108+
<CardHeader className="space-y-1">
109+
<CardTitle className="text-2xl font-bold text-center">Loading...</CardTitle>
110+
</CardHeader>
111+
</Card>
112+
</div>
113+
</div>
114+
)
115+
}
116+
117+
export default function VerifyPage() {
118+
return (
119+
<Suspense fallback={<LoadingVerifyPage />}>
120+
<VerifyPageContent />
121+
</Suspense>
122+
)
123+
}
124+

0 commit comments

Comments
 (0)