Fix the storybook: add a redux provider (#2191)

This commit is contained in:
katspaugh 2021-04-22 10:08:58 +02:00 committed by GitHub
parent 3d06cf251e
commit cbc9e08d91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,9 +1,11 @@
import React from 'react'
import { MemoryRouter } from 'react-router-dom'
import { Provider } from 'react-redux'
import { addDecorator } from '@storybook/react'
import { ThemeProvider, createGlobalStyle } from 'styled-components'
import { theme } from '@gnosis.pm/safe-react-components'
import { aNewStore } from 'src/store'
import averta from 'src/assets/fonts/Averta-normal.woff2'
import avertaBold from 'src/assets/fonts/Averta-ExtraBold.woff2'
@ -20,7 +22,9 @@ addDecorator((storyFn) => (
<ThemeProvider theme={theme}>
<MemoryRouter>
<GlobalStyles />
{storyFn()}
<Provider store={aNewStore()}>
{storyFn()}
</Provider>
</MemoryRouter>
</ThemeProvider>
))