Fix the storybook: add a redux provider (#2191)
This commit is contained in:
parent
3d06cf251e
commit
cbc9e08d91
|
@ -1,9 +1,11 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { MemoryRouter } from 'react-router-dom'
|
import { MemoryRouter } from 'react-router-dom'
|
||||||
|
import { Provider } from 'react-redux'
|
||||||
import { addDecorator } from '@storybook/react'
|
import { addDecorator } from '@storybook/react'
|
||||||
import { ThemeProvider, createGlobalStyle } from 'styled-components'
|
import { ThemeProvider, createGlobalStyle } from 'styled-components'
|
||||||
import { theme } from '@gnosis.pm/safe-react-components'
|
import { theme } from '@gnosis.pm/safe-react-components'
|
||||||
|
|
||||||
|
import { aNewStore } from 'src/store'
|
||||||
import averta from 'src/assets/fonts/Averta-normal.woff2'
|
import averta from 'src/assets/fonts/Averta-normal.woff2'
|
||||||
import avertaBold from 'src/assets/fonts/Averta-ExtraBold.woff2'
|
import avertaBold from 'src/assets/fonts/Averta-ExtraBold.woff2'
|
||||||
|
|
||||||
|
@ -20,7 +22,9 @@ addDecorator((storyFn) => (
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
<MemoryRouter>
|
<MemoryRouter>
|
||||||
<GlobalStyles />
|
<GlobalStyles />
|
||||||
|
<Provider store={aNewStore()}>
|
||||||
{storyFn()}
|
{storyFn()}
|
||||||
|
</Provider>
|
||||||
</MemoryRouter>
|
</MemoryRouter>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in New Issue