Skip to content

Commit

Permalink
Move registerServiceWorker, notification to utils
Browse files Browse the repository at this point in the history
- utils is a new directory under ./src/ holding misc modules that don't seem to
  fit anywhere else.
- createStore was excluded from utils since the store is a core part of our
  react/redux app, and so it does make sense as a standalone module in the root
  ./src/ directory
- Also fixed #37 unnecessary yield undefined.
  • Loading branch information
ning-y committed May 30, 2018
1 parent 5c0d34f commit 5c9fa5e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Store } from 'redux'
import ApplicationContainer from './containers/ApplicationContainer'
import createStore from './createStore'
import { IState } from './reducers/states'
import registerServiceWorker from './registerServiceWorker'
import registerServiceWorker from './utils/registerServiceWorker'

import './styles/index.css'

Expand Down
4 changes: 1 addition & 3 deletions src/sagas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Context, interrupt, runInContext } from '../slang'

import * as actions from '../actions'
import * as actionTypes from '../actions/actionTypes'
import { showSuccessMessage, showWarningMessage } from '../notification'
import { showSuccessMessage, showWarningMessage } from '../utils/notification'

function* evalCode(code: string, context: Context) {
const { result, interrupted } = yield race({
Expand Down Expand Up @@ -53,8 +53,6 @@ function* interpreterSaga(): SagaIterator {
yield put(actions.clearContext())
yield put(actions.clearReplOutput())
yield call(showSuccessMessage, `Switched to Source \xa7${newChapter}`)
} else {
yield undefined
}
})
}
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 5c9fa5e

Please sign in to comment.