From bd7bcafb485de7c6451c67eb3ce14f1d9446f1f0 Mon Sep 17 00:00:00 2001 From: David Heidrich Date: Wed, 18 May 2022 12:30:37 +0200 Subject: [PATCH] fix: adjusted nextjs `Router` behaviour and do not use `as` --- src/lib/adapters/NextJs.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/adapters/NextJs.tsx b/src/lib/adapters/NextJs.tsx index 3380372..70ed5cc 100644 --- a/src/lib/adapters/NextJs.tsx +++ b/src/lib/adapters/NextJs.tsx @@ -53,14 +53,14 @@ export const GeschichteForNextjs: FC = ({ }, push: (next: string, options) => { const [path] = split(Router.asPath) - Router.push(Router.route, `${path}${next}`, { + Router.push(`${path}${next}`, undefined, { ...defaultPushOptions, ...options, }) }, replace: (next: string, options) => { const [path] = split(Router.asPath) - Router.replace(Router.route, `${path}${next}`, { + Router.replace(`${path}${next}`, undefined, { ...defaultReplaceOptions, ...options, })