diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2017-07-25 00:08:26 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2017-07-25 00:08:26 +0200 |
commit | cf67eff86ef9a027c3247463d13b340644a0bb8c (patch) | |
tree | 5f4faa42ccb8308bbefe6fe55eea74294be053a8 /frontend/src/sagas | |
parent | Improve sevenWondersApi and types (diff) | |
download | seven-wonders-cf67eff86ef9a027c3247463d13b340644a0bb8c.tar.gz seven-wonders-cf67eff86ef9a027c3247463d13b340644a0bb8c.tar.bz2 seven-wonders-cf67eff86ef9a027c3247463d13b340644a0bb8c.zip |
Organize imports and format JS files
Diffstat (limited to 'frontend/src/sagas')
-rw-r--r-- | frontend/src/sagas/errors.js | 12 | ||||
-rw-r--r-- | frontend/src/sagas/gameBrowser.js | 17 | ||||
-rw-r--r-- | frontend/src/sagas/home.js | 12 | ||||
-rw-r--r-- | frontend/src/sagas/lobby.js | 19 |
4 files changed, 29 insertions, 31 deletions
diff --git a/frontend/src/sagas/errors.js b/frontend/src/sagas/errors.js index eece98c8..c5d68e62 100644 --- a/frontend/src/sagas/errors.js +++ b/frontend/src/sagas/errors.js @@ -1,10 +1,10 @@ // @flow -import { toastr } from 'react-redux-toastr' -import type { Channel } from 'redux-saga' -import { eventChannel } from 'redux-saga' -import { apply, cancelled, take } from 'redux-saga/effects' -import type { ApiError } from '../api/model' -import type { SevenWondersSession } from '../api/sevenWondersApi' +import { toastr } from 'react-redux-toastr'; +import type { Channel } from 'redux-saga'; +import { eventChannel } from 'redux-saga'; +import { apply, cancelled, take } from 'redux-saga/effects'; +import type { ApiError } from '../api/model'; +import type { SevenWondersSession } from '../api/sevenWondersApi'; export default function* errorHandlingSaga(session: SevenWondersSession): * { const errorChannel: Channel<ApiError> = yield eventChannel(session.watchErrors()); diff --git a/frontend/src/sagas/gameBrowser.js b/frontend/src/sagas/gameBrowser.js index 5b815f8d..ed17a723 100644 --- a/frontend/src/sagas/gameBrowser.js +++ b/frontend/src/sagas/gameBrowser.js @@ -1,13 +1,12 @@ // @flow -import { normalize } from 'normalizr' -import { push } from 'react-router-redux' -import { eventChannel } from 'redux-saga' -import { apply, call, put, take } from 'redux-saga/effects' -import type { SevenWondersSession } from '../api/sevenWondersApi' - -import { actions as gameActions, types } from '../redux/games' -import { actions as playerActions } from '../redux/players' -import { game as gameSchema, gameList as gameListSchema } from '../schemas/games' +import { normalize } from 'normalizr'; +import { push } from 'react-router-redux'; +import { eventChannel } from 'redux-saga'; +import { apply, call, put, take } from 'redux-saga/effects'; +import type { SevenWondersSession } from '../api/sevenWondersApi'; +import { actions as gameActions, types } from '../redux/games'; +import { actions as playerActions } from '../redux/players'; +import { game as gameSchema, gameList as gameListSchema } from '../schemas/games'; function* watchGames(session: SevenWondersSession): * { const gamesChannel = yield eventChannel(session.watchGames()); diff --git a/frontend/src/sagas/home.js b/frontend/src/sagas/home.js index 0b30f784..a6f19565 100644 --- a/frontend/src/sagas/home.js +++ b/frontend/src/sagas/home.js @@ -1,11 +1,11 @@ // @flow -import { apply, call, put, take } from 'redux-saga/effects' -import { push } from 'react-router-redux' -import { eventChannel } from 'redux-saga' +import { push } from 'react-router-redux'; +import { eventChannel } from 'redux-saga'; +import { apply, call, put, take } from 'redux-saga/effects'; +import type { ApiPlayer } from '../api/model'; +import type { SevenWondersSession } from '../api/sevenWondersApi'; -import { actions, types } from '../redux/players' -import type { SevenWondersSession } from '../api/sevenWondersApi' -import type { ApiPlayer } from '../api/model' +import { actions, types } from '../redux/players'; function* sendUsername(session: SevenWondersSession): * { while (true) { diff --git a/frontend/src/sagas/lobby.js b/frontend/src/sagas/lobby.js index 93e0960f..754bc5bb 100644 --- a/frontend/src/sagas/lobby.js +++ b/frontend/src/sagas/lobby.js @@ -1,14 +1,13 @@ // @flow -import { normalize } from 'normalizr' -import { push } from 'react-router-redux' -import type { Channel } from 'redux-saga' -import { eventChannel } from 'redux-saga' -import { apply, call, put, take } from 'redux-saga/effects' -import { SevenWondersSession } from '../api/sevenWondersApi' -import { actions as gameActions, types } from '../redux/games' -import { actions as playerActions } from '../redux/players' - -import { game as gameSchema } from '../schemas/games' +import { normalize } from 'normalizr'; +import { push } from 'react-router-redux'; +import type { Channel } from 'redux-saga'; +import { eventChannel } from 'redux-saga'; +import { apply, call, put, take } from 'redux-saga/effects'; +import { SevenWondersSession } from '../api/sevenWondersApi'; +import { actions as gameActions, types } from '../redux/games'; +import { actions as playerActions } from '../redux/players'; +import { game as gameSchema } from '../schemas/games'; function getCurrentGameId(): number { const path = window.location.pathname; |