Skip to content

Commit

Permalink
fix(storybook): Quickfix profile story
Browse files Browse the repository at this point in the history
  • Loading branch information
lutangar committed Oct 15, 2020
1 parent 5c8664d commit 1e3e816
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/app/profiles/App/Pages/Profiles/Profile/Profile.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import React from 'react';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import { storiesOf } from '@storybook/react';
import { MemoryRouter as Router } from 'react-router-dom';
import { action } from '@storybook/addon-actions';
import { createBrowserHistory } from 'history';
import Profile from './Profile';
import { generateStatefulNotice } from 'test/fakers/generateNotice';
import { generateStatefulContributor } from 'test/fakers/generateContributor';
import { MemoryRouter as Router } from 'react-router-dom';
import rootReducer from '../../../../store/reducers';

const store = createStore(rootReducer(createBrowserHistory()));

storiesOf('Profile/Profile', module)
.addDecorator(getStory => <Router>{getStory()}</Router>)
.addDecorator(getStory => (
<Router>
<Provider store={store}>{getStory()}</Provider>
</Router>
))
.add('Normal', () => (
<Profile
featuredNotice={generateStatefulNotice()}
Expand Down

0 comments on commit 1e3e816

Please sign in to comment.