···77import { generateClientApiJson, generateSourceApiJson, generateSourcePlayerJson } from "../core/tests/utils/apiFixtures.js";
88import { generateArray } from "../core/DataUtils.js";
99import { faker } from "@faker-js/faker";
1010+import { MsSseEvent } from "../core/Api.js";
1111+import { SSEProvider } from "@flamefrontend/sse-runtime-react";
1212+import { sseProviderOptions } from "../client/AppNext.js";
1313+import { withRouter, reactRouterParameters } from 'storybook-addon-remix-react-router';
10141115// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
1216const meta = preview.meta({
···1519 parameters: {
1620 // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
1721 layout: 'padded',
2222+ reactRouter: reactRouterParameters({
2323+ location: {
2424+ path: '/'
2525+ },
2626+ routing: {
2727+ path: '/',
2828+ useStoryElement: true
2929+ }
3030+ }),
1831 },
1932 // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
2033 tags: ['autodocs'],
···3245 return (<MSComponentList {...args} />)
3346 },
3447decorators: [
3535- (Story) => (<Provider><Container maxWidth="4xl"><Story/></Container></Provider>),
4848+ withRouter,
4949+ (Story) => (<Provider><Container maxWidth="4xl"><SSEProvider<MsSseEvent> options={sseProviderOptions}><Story/></SSEProvider></Container></Provider>),
3650 ]
3751 // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
3852});