Created
November 1, 2020 22:37
-
-
Save mbrown3321/cf696c79b85548ec0ebae43109c2baf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {FETCH_UPLOADS_COMMIT, FETCH_UPLOADS, ADD_UPLOAD} from '../actions'; | |
export default function uploads(state = [], action) { | |
switch (action.type) { | |
case FETCH_UPLOADS: | |
return state; | |
case FETCH_UPLOADS_COMMIT: | |
return [...action.payload]; | |
case ADD_UPLOAD: | |
return [...state, action.payload]; | |
default: | |
return state; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment