Skip to content

Commit

Permalink
clean up code for pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
colebillys19 committed Jun 13, 2019
1 parent 6ca43c4 commit 7ac5944
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
"react-redux": "^6.0.0",
"react-scripts": "2.1.2",
"redux": "^4.0.1",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test:debug": "react-scripts --inspect-brk test --runInBand --no-cache",
"eject": "react-scripts eject",
"predeploy": "npm run -s build",
"deploy": "node scripts/deploy.js"
Expand Down
2 changes: 1 addition & 1 deletion src/actions/action-creators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import panes from '../constants/pane-types';
import { initializeCalculator } from '../lib/calculator';

const middlewares = [thunkMiddleware];
let mockStore = configureMockStore(middlewares);
const mockStore = configureMockStore(middlewares);

describe('Action creators', () => {
/***** sync *****/
Expand Down
5 changes: 0 additions & 5 deletions src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ const ERROR_DELAY = 3000;
let nextFrameID = 0;
let errorTimeout;

/********************************************************************************/
/*** Synchronous ****************************************************************/
/********************************************************************************/

export const addFrame = imageData => ({
type: types.ADD_FRAME,
payload: {
Expand Down Expand Up @@ -170,7 +166,6 @@ export const requestBurst = opts => async (dispatch, getState) => {
for (let val = min; val <= max; val += step) {
sliderErrorMessage = setSliderByIndex(idx, val);
if (sliderErrorMessage) {
dispatch(addFrame(sliderErrorMessage));
dispatch(flashError(sliderErrorMessage));
return;
}
Expand Down
6 changes: 1 addition & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import { Provider } from 'react-redux';
import thunkMiddleware from 'redux-thunk';
import rootReducer from './reducers';
Expand All @@ -11,10 +10,7 @@ import { togglePane } from './actions';
import greet from './lib/dev-greeting';
import './index.css';

const store = createStore(
rootReducer,
composeWithDevTools(applyMiddleware(thunkMiddleware))
);
const store = createStore(rootReducer, applyMiddleware(thunkMiddleware));

const closePane = () => store.dispatch(togglePane(panes.NONE));

Expand Down

0 comments on commit 7ac5944

Please sign in to comment.