diff --git a/src/index.tsx b/src/index.tsx index 99699c1..6aa26ff 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -23,4 +23,3 @@ export { createOrApplyPath, defaultSkipValue, } from './lib/utils.js' -export { default as default } from './lib/adapters/historyjs/index.js' diff --git a/src/lib/adapters/nextjs/index.tsx b/src/lib/adapters/nextjs/index.tsx index 2109704..edd3ebb 100644 --- a/src/lib/adapters/nextjs/index.tsx +++ b/src/lib/adapters/nextjs/index.tsx @@ -36,13 +36,13 @@ interface Props { // tslint:disable-next-line:no-mixed-interface readonly routerPush?: ( url: Url, - as: UrlObject, + as?: UrlObject, options?: TransitionOptions ) => Promise // tslint:disable-next-line:no-mixed-interface readonly routerReplace?: ( url: Url, - as: UrlObject, + as?: UrlObject, options?: TransitionOptions ) => Promise } @@ -83,14 +83,14 @@ export const GeschichteForNextjs: FC = ({ if (routerPush) { return routerPush( - { pathname, query: Router.query }, - { pathname, query }, + { query: Router.query }, + { query, pathname }, routerOptions ) } return Router.push( - { pathname, query: Router.query }, - { pathname, query }, + { query: Router.query }, + { query, pathname }, routerOptions ) }, @@ -104,13 +104,13 @@ export const GeschichteForNextjs: FC = ({ if (routerReplace) { return routerReplace( - { pathname, query: Router.query }, + { query: Router.query }, { pathname, query }, routerOptions ) } return Router.replace( - { pathname, query: Router.query }, + { query: Router.query }, { pathname, query }, routerOptions )