mirror of
https://github.com/TrentSPalmer/fcc-challenges.git
synced 2025-07-11 20:53:14 -07:00
add calculator-react
This commit is contained in:
14
calculator-react/src/reducers/operationStringReducer.js
Normal file
14
calculator-react/src/reducers/operationStringReducer.js
Normal file
@ -0,0 +1,14 @@
|
||||
import { SETOPERATIONSTRING } from "../actions/operationStringAction";
|
||||
|
||||
export default (state, action) => {
|
||||
if (!state) {
|
||||
state = '';
|
||||
}
|
||||
|
||||
switch (action.type) {
|
||||
case SETOPERATIONSTRING:
|
||||
return action.operationString;
|
||||
default:
|
||||
return state;
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user