diff --git a/src/components/General/LeftSidebar/LeftSidebar.stories.tsx b/src/components/General/LeftSidebar/LeftSidebar.stories.tsx index 03bd4c38..71b6a7f4 100644 --- a/src/components/General/LeftSidebar/LeftSidebar.stories.tsx +++ b/src/components/General/LeftSidebar/LeftSidebar.stories.tsx @@ -1,6 +1,7 @@ import type { Meta, StoryObj } from '@storybook/react' import LeftSidebar from './LeftSidebar' +import { withRouter } from 'storybook-addon-react-router-v6' const meta = { title: 'General/LeftSidebar', @@ -9,6 +10,7 @@ const meta = { layout: 'centered', }, tags: ['autodocs'], + decorators: [withRouter], } satisfies Meta export default meta diff --git a/src/components/General/LeftSidebar/LeftSidebarIconButton.stories.tsx b/src/components/General/LeftSidebar/LeftSidebarIconButton.stories.tsx index d4ebd353..71818d1f 100644 --- a/src/components/General/LeftSidebar/LeftSidebarIconButton.stories.tsx +++ b/src/components/General/LeftSidebar/LeftSidebarIconButton.stories.tsx @@ -1,16 +1,8 @@ import type { Meta, StoryObj } from '@storybook/react' -import { - DashboardIcon, - SpeedIcon, - ChartIcon, - HeartIcon, - CodeBlockIcon, - CommunitiesIcon, - ActivityCenterIcon, - SettingsIcon, -} from '@status-im/icons' +import { DashboardIcon } from '@status-im/icons' import LeftSidebarIconButton from './LeftSidebarIconButton' +import { withRouter } from 'storybook-addon-react-router-v6' const meta = { title: 'General/LeftSidebarIconButton', @@ -19,6 +11,7 @@ const meta = { layout: 'centered', }, tags: ['autodocs'], + decorators: [withRouter], } satisfies Meta export default meta @@ -31,6 +24,7 @@ export const Default: Story = { isSelected: false, isDisabled: false, id: 'dashboard', + path: 'dashboard', }, } @@ -41,6 +35,7 @@ export const DotOn: Story = { isSelected: false, isDisabled: false, id: 'dashboard', + path: 'dashboard', }, } @@ -51,95 +46,6 @@ export const Selected: Story = { isSelected: true, isDisabled: false, id: 'dashboard', - }, -} - -export const Disabled: Story = { - args: { - iconEl: , - isDotOn: false, - isSelected: false, - isDisabled: true, - id: 'dashboard', - }, -} - -export const Dashboard: Story = { - args: { - iconEl: , - isDotOn: false, - isSelected: true, - isDisabled: false, - id: 'dashboard', - }, -} - -export const Speed: Story = { - args: { - iconEl: , - isDotOn: false, - isSelected: false, - isDisabled: false, - id: 'speed', - }, -} - -export const Chart: Story = { - args: { - iconEl: , - isDotOn: false, - isSelected: false, - isDisabled: true, - id: 'chart', - }, -} - -export const Heart: Story = { - args: { - iconEl: , - isDotOn: false, - isSelected: false, - isDisabled: false, - id: 'heart', - }, -} - -export const CodeBlock: Story = { - args: { - iconEl: , - isDotOn: false, - isSelected: false, - isDisabled: false, - id: 'codeBlock', - }, -} - -export const Communities: Story = { - args: { - iconEl: , - isDotOn: false, - isSelected: false, - isDisabled: false, - id: 'communities', - }, -} - -export const ActivityCenter: Story = { - args: { - iconEl: , - isDotOn: true, - isSelected: false, - isDisabled: false, - id: 'activityCenter', - }, -} - -export const Settings: Story = { - args: { - iconEl: , - isDotOn: false, - isSelected: false, - isDisabled: false, - id: 'settings', + path: 'dashboard', }, } diff --git a/src/pages/Dashboard/Dashboard.stories.ts b/src/pages/Dashboard/Dashboard.stories.ts index ff5a8435..18b436e4 100644 --- a/src/pages/Dashboard/Dashboard.stories.ts +++ b/src/pages/Dashboard/Dashboard.stories.ts @@ -1,6 +1,7 @@ import type { Meta, StoryObj } from '@storybook/react' import Dashboard from './Dashboard' +import { withRouter } from 'storybook-addon-react-router-v6' const meta = { title: 'Pages/Dashboard', @@ -9,6 +10,7 @@ const meta = { layout: 'centered', }, tags: ['autodocs'], + decorators: [withRouter], } satisfies Meta export default meta diff --git a/src/pages/LogsPage/LogsPage.stories.ts b/src/pages/LogsPage/LogsPage.stories.ts index 09b9bef2..8fe37816 100644 --- a/src/pages/LogsPage/LogsPage.stories.ts +++ b/src/pages/LogsPage/LogsPage.stories.ts @@ -1,6 +1,7 @@ import type { Meta, StoryObj } from '@storybook/react' import LogsPage from './LogsPage' +import { withRouter } from 'storybook-addon-react-router-v6' const meta = { title: 'LogsPage/LogsPage', @@ -9,6 +10,7 @@ const meta = { layout: 'centered', }, tags: ['autodocs'], + decorators: [withRouter], } satisfies Meta export default meta