Browse Source

Merge pull request #169 from meriadec/master

Flow fix
master
Loëck Vézien 7 years ago
committed by GitHub
parent
commit
782b9dfbfe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/components/base/CheckBox/stories.js
  2. 2
      src/components/base/Radio/stories.js
  3. 2
      src/components/base/Tabs/stories.js
  4. 3
      src/components/layout/Default.js
  5. 4
      src/renderer/createStore.js

2
src/components/base/CheckBox/stories.js

@ -1,5 +1,3 @@
// @flow
import React from 'react' import React from 'react'
import { storiesOf } from '@storybook/react' import { storiesOf } from '@storybook/react'
import { boolean } from '@storybook/addon-knobs' import { boolean } from '@storybook/addon-knobs'

2
src/components/base/Radio/stories.js

@ -1,5 +1,3 @@
// @flow
import React from 'react' import React from 'react'
import { storiesOf } from '@storybook/react' import { storiesOf } from '@storybook/react'
import { action } from '@storybook/addon-actions' import { action } from '@storybook/addon-actions'

2
src/components/base/Tabs/stories.js

@ -1,5 +1,3 @@
// @flow
import React from 'react' import React from 'react'
import { number } from '@storybook/addon-knobs' import { number } from '@storybook/addon-knobs'

3
src/components/layout/Default.js

@ -38,15 +38,18 @@ class Default extends Component<Props> {
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
if (this.props.location !== prevProps.location) { if (this.props.location !== prevProps.location) {
if (this._scrollContainer) {
this._scrollContainer._scrollbar.scrollTo(0, 0) this._scrollContainer._scrollbar.scrollTo(0, 0)
} }
} }
}
componentWillUnmount() { componentWillUnmount() {
clearTimeout(this._timeout) clearTimeout(this._timeout)
} }
_timeout = undefined _timeout = undefined
_scrollContainer = null
render() { render() {
return ( return (

4
src/renderer/createStore.js

@ -1,6 +1,6 @@
// @flow // @flow
import type { RouterHistory } from 'react-router-dom' import type { HashHistory } from 'history'
import { createStore, applyMiddleware, compose } from 'redux' import { createStore, applyMiddleware, compose } from 'redux'
import { routerMiddleware } from 'react-router-redux' import { routerMiddleware } from 'react-router-redux'
@ -10,7 +10,7 @@ import db from 'middlewares/db'
import reducers from 'reducers' import reducers from 'reducers'
export default (history: RouterHistory) => { export default (history: HashHistory) => {
const middlewares = [routerMiddleware(history), thunk, db] const middlewares = [routerMiddleware(history), thunk, db]
const enhancers = compose( const enhancers = compose(
applyMiddleware(...middlewares), applyMiddleware(...middlewares),

Loading…
Cancel
Save