fix(SW-690): use correct naming of search params in booking
Approved-by: Bianca Widstam Approved-by: Linus Flood
This commit is contained in:
@@ -51,9 +51,10 @@ export default function Link({
|
||||
const router = useRouter()
|
||||
|
||||
const fullUrl = useMemo(() => {
|
||||
const search =
|
||||
keepSearchParams && searchParams.size ? `?${searchParams}` : ""
|
||||
return `${href}${search}`
|
||||
if (!keepSearchParams || !searchParams.size) return href
|
||||
|
||||
const delimiter = href.includes("?") ? "&" : "?"
|
||||
return `${href}${delimiter}${searchParams}`
|
||||
}, [href, searchParams, keepSearchParams])
|
||||
|
||||
// TODO: Remove this check (and hook) and only return <Link /> when current web is deleted
|
||||
|
||||
Reference in New Issue
Block a user