Skip to content

Commit f40fa93

Browse files
committed
fix(oauth): wrap consent page useSearchParams in Suspense
Next 16.2's stricter prerender check fails the build when useSearchParams() is used without a Suspense boundary. Splits the client component into an outer wrapper and inner body.
1 parent dd08af0 commit f40fa93

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • apps/sim/app/(auth)/oauth/consent

apps/sim/app/(auth)/oauth/consent/page.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { useCallback, useEffect, useState } from 'react'
3+
import { Suspense, useCallback, useEffect, useState } from 'react'
44
import { ArrowLeftRight } from 'lucide-react'
55
import Image from 'next/image'
66
import { useRouter, useSearchParams } from 'next/navigation'
@@ -25,6 +25,14 @@ interface ClientInfo {
2525
}
2626

2727
export default function OAuthConsentPage() {
28+
return (
29+
<Suspense fallback={null}>
30+
<OAuthConsentInner />
31+
</Suspense>
32+
)
33+
}
34+
35+
function OAuthConsentInner() {
2836
const router = useRouter()
2937
const searchParams = useSearchParams()
3038
const { data: session } = useSession()

0 commit comments

Comments
 (0)