mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
fix basePath prefix
This commit is contained in:
1 parent
f1cee47485
commit
41f75eb993
1 file changed
+5
-1
@@ -104,7 +104,11 @@ export function useRouter() {
|
||||
route: pathPattern,
|
||||
query: { ...params, ...search },
|
||||
asPath: location.href,
|
||||
basePath: router.basepath ?? '',
|
||||
basePath: router.basepath
|
||||
? router.basepath.startsWith('/')
|
||||
? router.basepath
|
||||
: `/${router.basepath}`
|
||||
: '',
|
||||
// TanStack resolves params/search synchronously on render, so the
|
||||
// pages-router "is the dynamic param ready yet?" flag is always
|
||||
// true here. (In Next this can be false during the very first
|
||||
|
||||
Reference in new issue
Block a user