fcc-challenges/pomodoro-clock-react/src/reducers/zeroTimeReducer.js

15 lines
247 B
JavaScript
Raw Normal View History

2020-06-11 01:36:48 -07:00
import { SETZEROTIME } from "../actions/zeroTimeAction";
export default (state, action) => {
if (!state) {
state = 0;
}
switch (action.type) {
case SETZEROTIME:
return action.zeroTime;
default:
return state;
}
};