Skip to content

Commit

Permalink
added handler for fetchwather
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Jan 3, 2016
1 parent 8b10986 commit 76f9b96
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion weather/src/reducers/reducer_weather.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
export default function(state = null, action) {
import { FETCH_WEATHER } from '../actions/index';

export default function(state = [], action) {
switch (action.type) {
case FETCH_WEATHER:
return [ action.payload.data, ...state ];
}
return state;
}

0 comments on commit 76f9b96

Please sign in to comment.