Skip to content

Commit 4d3aa9a

Browse files
author
devgioele
committed
make query available on first render for the client
1 parent b82e482 commit 4d3aa9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/routers/nextRouter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const useNextRouter = (
2424
const nextRouter = useRouter()
2525
const [nextRouterQuery, setNextRouterQuery] = useState<
2626
typeof nextRouter.query
27-
>({})
27+
>(nextRouter.isReady ? nextRouter.query : {})
2828

2929
const mergedOptions = useMemo(
3030
() => ({ ...DEFAULT_NEXT_ROUTER_OPTIONS, ...options }),

0 commit comments

Comments
 (0)