From 9b7cf9febd51868a03e44eb57b2ae07f24ed4caa Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Sat, 23 Mar 2024 18:13:11 +0200 Subject: [PATCH] fix(validator stories): add decorator for router --- .../RightSideBar/ValidatorsTabs/ValidatorListItem.stories.tsx | 2 ++ src/components/General/ValidatorNameAddress.stories.tsx | 2 ++ src/components/General/ValidatorProfile.stories.tsx | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/components/General/RightSideBar/ValidatorsTabs/ValidatorListItem.stories.tsx b/src/components/General/RightSideBar/ValidatorsTabs/ValidatorListItem.stories.tsx index 485166db..a615eeb3 100644 --- a/src/components/General/RightSideBar/ValidatorsTabs/ValidatorListItem.stories.tsx +++ b/src/components/General/RightSideBar/ValidatorsTabs/ValidatorListItem.stories.tsx @@ -1,4 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react' +import { withRouter } from 'storybook-addon-react-router-v6' import ValidatorListItem from './ValidatorListItem' @@ -8,6 +9,7 @@ const meta = { parameters: { layout: 'centered', }, + decorators: [withRouter()], tags: ['autodocs'], } satisfies Meta diff --git a/src/components/General/ValidatorNameAddress.stories.tsx b/src/components/General/ValidatorNameAddress.stories.tsx index fa3abbfd..e44ae3bd 100644 --- a/src/components/General/ValidatorNameAddress.stories.tsx +++ b/src/components/General/ValidatorNameAddress.stories.tsx @@ -1,4 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react' +import { withRouter } from 'storybook-addon-react-router-v6' import ValidatorNameAddress from './ValidatorNameAddress' @@ -6,6 +7,7 @@ const meta = { title: 'General/ValidatorNameAddress', component: ValidatorNameAddress, tags: ['autodocs'], + decorators: [withRouter()], } satisfies Meta export default meta diff --git a/src/components/General/ValidatorProfile.stories.tsx b/src/components/General/ValidatorProfile.stories.tsx index ca03e7f6..9e0190d9 100644 --- a/src/components/General/ValidatorProfile.stories.tsx +++ b/src/components/General/ValidatorProfile.stories.tsx @@ -1,4 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react' +import { withRouter } from 'storybook-addon-react-router-v6' import ValidatorProfile from './ValidatorProfile' @@ -6,6 +7,7 @@ const meta = { title: 'General/ValidatorProfile', component: ValidatorProfile, tags: ['autodocs'], + decorators: [withRouter()], } satisfies Meta export default meta