mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 04:15:04 +03:00
fix params
This commit is contained in:
1 file changed
+4
-1
@@ -12,8 +12,11 @@ interface ReportHeaderProps {
|
||||
}
|
||||
|
||||
/** App Router: reconstruct a single-value query map from the current URL (no duplicate keys). */
|
||||
function queryFromSearchParams(searchParams: ReturnType<typeof useSearchParams>) {
|
||||
function queryFromSearchParams(
|
||||
searchParams: ReturnType<typeof useSearchParams> | null
|
||||
) {
|
||||
const q: Record<string, string | string[] | undefined> = {}
|
||||
if (!searchParams) return q
|
||||
searchParams.forEach((value, key) => {
|
||||
q[key] = value
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user