Fix: Make storybook work with redux
This commit is contained in:
parent
ec90dfb13a
commit
02b043167b
|
@ -31,13 +31,13 @@ const router = createBrowserRouter([
|
|||
|
||||
function App() {
|
||||
return (
|
||||
<TamaguiProvider config={config}>
|
||||
<ReduxProvider store={store}>
|
||||
<ReduxProvider store={store}>
|
||||
<TamaguiProvider config={config}>
|
||||
<StatusProvider>
|
||||
<RouterProvider router={router} />
|
||||
</StatusProvider>
|
||||
</ReduxProvider>
|
||||
</TamaguiProvider>
|
||||
</TamaguiProvider>
|
||||
</ReduxProvider>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,26 @@
|
|||
import type { Meta, StoryObj } from '@storybook/react'
|
||||
import { Provider as ReduxProvider } from 'react-redux'
|
||||
import store from '../../redux/store' // Adjust` the path to your store accordingly
|
||||
|
||||
import DeviceHealthCheck from './DeviceHealthCheck'
|
||||
|
||||
const meta = {
|
||||
const meta: Meta = {
|
||||
title: 'Pages/DeviceHealthCheck',
|
||||
component: DeviceHealthCheck,
|
||||
decorators: [
|
||||
StoryObj => (
|
||||
<ReduxProvider store={store}>
|
||||
<StoryObj />
|
||||
</ReduxProvider>
|
||||
),
|
||||
],
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof DeviceHealthCheck>
|
||||
}
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Page: Story = {
|
||||
type DeviceHealthCheckStory = StoryObj<typeof DeviceHealthCheck>
|
||||
|
||||
export const Page: DeviceHealthCheckStory = {
|
||||
args: {},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue