Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions server/plugins/routes/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { StaticRouter } from 'react-router'
import { Base64 } from 'js-base64'
import { getAssets, getCss } from 'server/utils'
import configureStore from 'src/redux/store'
import { initialState as authInitialState } from 'src/redux/modules/auth'
import authInitialState from 'src/redux/modules/auth/initialState'
import Routes from 'src/routes'
import env from 'config/env'
import vars from 'config/variables'
import { getTodos } from 'src/redux/modules/examples/todos'
import { getTodos } from 'src/redux/modules/examples/todos/actions'

// Material-UI
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
Expand All @@ -32,7 +32,7 @@ export default {
module.hot.accept([
'src/routes',
'src/redux/store',
'src/redux/modules/auth',
'src/redux/modules/auth/reducer',
'config/env',
'config/variables',
'server/utils',
Expand Down
7 changes: 2 additions & 5 deletions src/components/examples/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { withRouter } from 'react-router'
import { logout } from 'src/redux/modules/auth'
import { logout } from 'src/redux/modules/auth/actions'
import Home from './Home'


type StateProps = {
}
type StateProps = {}

const mapStateToProps = (): StateProps => ({})

Expand All @@ -19,6 +17,5 @@ type DispatchProps = {
const mapDispatchToProps = (dispatch: GlobalDispatch<*>): DispatchProps =>
bindActionCreators({ logout }, dispatch)


export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Home))
export type ReduxProps = StateProps & DispatchProps
4 changes: 2 additions & 2 deletions src/components/examples/Profile/Profile.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* @flow
*/

import React, { Component } from 'react'
import React, { PureComponent } from 'react'
import {
StyleSheet,
Text,
View,
} from 'react-native'

class Home extends Component<void> {
class Home extends PureComponent<void> {

render () {

Expand Down
6 changes: 2 additions & 4 deletions src/components/examples/Profile/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// @flow
import { connect } from 'react-redux'
import { fetchProfile } from 'src/redux/modules/examples/profile'
import type { Profile as ProfileModel } from 'src/redux/modules/examples/profile'
import { fetchProfile } from 'src/redux/modules/examples/profile/actions'
import type { Profile as ProfileModel } from 'src/redux/modules/examples/profile/types'
import type { RootReducerState } from 'src/redux/modules'
import Profile from './Profile'


type StateProps = {
me: ProfileModel,
error: ?string,
Expand All @@ -18,7 +17,6 @@ const mapStateToProps = (
error: profile.error,
})


type DispatchProps = {
fetchProfile: Function,
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/examples/Template/Template.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* @flow
*/

import React, { Component } from 'react'
import React, { PureComponent } from 'react'
import {
StyleSheet,
Text,
View,
} from 'react-native'

class Home extends Component<void> {
class Home extends PureComponent<void> {

render () {

Expand Down
4 changes: 2 additions & 2 deletions src/components/examples/Todos/Todos.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* @flow
*/

import React, { Component } from 'react'
import React, { PureComponent } from 'react'
import {
StyleSheet,
Text,
View,
} from 'react-native'

class Home extends Component<void> {
class Home extends PureComponent<void> {

render () {

Expand Down
2 changes: 1 addition & 1 deletion src/components/examples/Todos/Todos_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import React from 'react'
import { shallow } from 'enzyme'
import { initialState } from 'src/redux/modules/examples/todos'
import initialState from 'src/redux/modules/examples/todos/initialState'
import Todos from './Todos'

const mockProps = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/examples/Todos/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
getTodos,
setFilterCurrent,
setFilterDone,
} from 'src/redux/modules/examples/todos'
} from 'src/redux/modules/examples/todos/actions'
import getVisibleTodos from 'src/selectors/getVisibleTodos'
import type { Todo } from 'src/redux/modules/examples/todos'
import type { Todo } from 'src/redux/modules/examples/todos/types'
import type { RootReducerState } from 'src/redux/modules'
import Todos from './Todos'

Expand Down
13 changes: 7 additions & 6 deletions src/components/shared/Modal/Login/Login.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connect } from 'react-redux'
import { reduxForm } from 'redux-form'
import { withRouter } from 'react-router'
import { parse } from 'qs'
import { login } from 'src/redux/modules/auth'
import { login } from 'src/redux/modules/auth/actions'
import type { RootReducerState } from 'src/redux/modules'
import Login from './Login'

Expand All @@ -29,11 +29,12 @@ const onSubmit = (values, dispatch, props): Promise<*> => {
const { history } = props
const search = parse(props.location.search.substr(1))

return dispatch(login({
username: usernameInput,
password: passwordInput,
}))
.then(() => history.push({ pathname: search.redirect }))
return dispatch(
login({
username: usernameInput,
password: passwordInput,
})
).then(() => history.push({ pathname: search.redirect }))

}

Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions src/helpers/api/index_test.js → src/helpers/api_test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// @flow
import Nock from 'nock'
import _get from 'lodash/get'
import { get, post, patch, put, del, mock } from './'

import { get, post, patch, put, del, mock } from './api'

it('get fetches via GET', async () => {

Expand Down
2 changes: 1 addition & 1 deletion src/index.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Rollbar from 'rollbar/dist/rollbar.umd.min'
import { Provider } from 'react-redux'
import { BrowserRouter as Router } from 'react-router-dom'
import configureStore from 'src/redux/store'
import { loadSuccess } from 'src/redux/modules/init'
import { loadSuccess } from 'src/redux/modules/init/actions'
import rollbarConfig from 'config/rollbar'
import vars from 'config/variables'

Expand Down
4 changes: 2 additions & 2 deletions src/index.ios.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React, { Component } from 'react'
import React, { PureComponent } from 'react'
// import { StatusBar } from 'react-native'
import { Provider } from 'react-redux'
import { NativeRouter } from 'react-router-native'
Expand Down Expand Up @@ -28,7 +28,7 @@ const store = configureStore()
// }
/* END HTTP DEBUG */

class ReactTemplate extends Component<void> {
class ReactTemplate extends PureComponent<void> {

// componentDidMount () {

Expand Down
4 changes: 2 additions & 2 deletions src/redux/epics/fetchProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import 'rxjs/add/operator/catch'
import 'rxjs/add/operator/do'
import 'rxjs/add/operator/map'
import 'rxjs/add/operator/mergeMap'
import { GET_PROFILE } from 'src/redux/modules/examples/profile/consts'
import {
GET_PROFILE,
fetchProfileSuccess,
fetchProfileError,
} from 'src/redux/modules/examples/profile'
} from 'src/redux/modules/examples/profile/actions'
import API from 'src/helpers/observableApi'

const api = new API()
Expand Down
137 changes: 0 additions & 137 deletions src/redux/modules/auth.js

This file was deleted.

Loading