Fix story for validator onboadring

This commit is contained in:
Hristo Nedelkov 2023-09-04 12:39:52 +03:00
parent bcecedcbfc
commit 36286eee4b
1 changed files with 10 additions and 1 deletions

View File

@ -2,7 +2,16 @@ import type { Meta, StoryObj } from '@storybook/react'
import { withRouter } from 'storybook-addon-react-router-v6'
import ValidatorOnboarding from './ValidatorOnboarding'
import { Provider as ReduxProvider } from 'react-redux'
import store from '../../redux/store'
const withRedux = (StoryComponent: any) => {
return (
<ReduxProvider store={store} >
<StoryComponent />
</ReduxProvider>
);
}
const meta = {
title: 'Pages/ValidatorOnboarding',
component: ValidatorOnboarding,
@ -10,7 +19,7 @@ const meta = {
layout: 'centered',
},
tags: ['autodocs'],
decorators: [withRouter()],
decorators: [withRouter(), withRedux],
} satisfies Meta<typeof ValidatorOnboarding>
export default meta