Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Fix the storybook: add a redux provider (#2191)
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh authored Apr 22, 2021
1 parent 3d06cf2 commit cbc9e08
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -20,7 +22,9 @@ addDecorator((storyFn) => (
<ThemeProvider theme={theme}>
<MemoryRouter>
<GlobalStyles />
{storyFn()}
<Provider store={aNewStore()}>
{storyFn()}
</Provider>
</MemoryRouter>
</ThemeProvider>
))

0 comments on commit cbc9e08

Please sign in to comment.