atlassian-labs/storybook-addon-performance

Error: NextRouter was not mounted. Storybook 7.0.9, NextJS 13.1.4

dacgray opened this issue · 1 comments

We set up storybook with these instructions: https://storybook.js.org/blog/get-started-with-storybook-and-next-js/

In these versions we set router parameters with:

const parameters = {
    nextjs: {
        router: {
            route: '/my-route',
            path: '/my-route',
            asPath: '/my-route',
            locale: 'en-GB',
        },
    },
}

const getStory = (handler: FooHandler): Story => {
    return {
        parameters,
        ...

We get Error: NextRouter was not mounted

router.js:121

Any ideas on how to resolve this?