Skip to content

Instantly share code, notes, and snippets.

@Porter97
Created April 27, 2020 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Porter97/cf7e96cca5ce1565b215feb3ecfec24e to your computer and use it in GitHub Desktop.
Save Porter97/cf7e96cca5ce1565b215feb3ecfec24e to your computer and use it in GitHub Desktop.
#...
export default (state = defaultState, action) => {
switch(action.type) {
#...
case 'COLLECTION_SUBMITTED':
const redirectUrl = `collection/${action.payload.collection.id}`;
return { ...state, redirectTo: redirectUrl };
case 'DELETE_COLLECTION':
return { ...state, redirectTo: '/' };
#...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment