storybook/docs/snippets/react/nextjs-navigation-push-override-in-preview.js.mdx
Kyle Gach 7bdefcb15a Address comments
- Simplify navigation/router fn override guidance
- Fix incorrect snippet
- Consistently format headings
2024-01-24 15:22:16 -07:00

22 lines
397 B
Plaintext

```js
// .storybook/preview.js
export default {
// ...
parameters: {
// ...
nextjs: {
navigation: {
push(...args) {
// Custom logic can go here
// This logs to the Actions panel
action('nextNavigation.push')(...args);
// Return whatever you want here
return Promise.resolve(true);
},
},
},
},
};
```