forked from sohamkamani/blog-example__redux-data
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b63ee6
commit 22ee50f
Showing
16 changed files
with
69 additions
and
733 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,10 +28,6 @@ module.exports = { | |
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"id" : 0, | ||
"text" : "Make API calls simpler", | ||
"completed" : false | ||
}, | ||
{ | ||
"id" : 1, | ||
"text" : "Profit", | ||
"completed" : false | ||
} | ||
] |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
const todo = (state, action) => { | ||
switch (action.type) { | ||
case 'ADD_TODO': | ||
return { | ||
id: action.id, | ||
text: action.text, | ||
completed: false | ||
} | ||
case 'TOGGLE_TODO': | ||
if (state.id !== action.id) { | ||
return state | ||
} | ||
switch (action.type) { | ||
case 'ADD_TODO': | ||
return { | ||
id: action.id, | ||
text: action.text, | ||
completed: false | ||
} | ||
case 'TOGGLE_TODO': | ||
if (state.id !== action.id) { | ||
return state | ||
} | ||
|
||
return Object.assign({}, state, { | ||
completed: !state.completed | ||
}) | ||
default: | ||
return state | ||
} | ||
return Object.assign({}, state, { | ||
completed: !state.completed | ||
}) | ||
default: | ||
return state | ||
} | ||
} | ||
|
||
const todos = (state = [], action) => { | ||
switch (action.type) { | ||
case 'ADD_TODO': | ||
return [ | ||
...state, | ||
todo(undefined, action) | ||
] | ||
case 'TOGGLE_TODO': | ||
return state.map(t => | ||
todo(t, action) | ||
) | ||
case 'GET_TODO_DATA_RECEIVED': | ||
return action.data | ||
default: | ||
return state | ||
} | ||
switch (action.type) { | ||
case 'ADD_TODO': | ||
return [ | ||
...state, | ||
todo(undefined, action) | ||
] | ||
case 'TOGGLE_TODO': | ||
return state.map(t => | ||
todo(t, action) | ||
) | ||
case 'GET_TODO_DATA_RECEIVED': | ||
return action.data | ||
default: | ||
return state | ||
} | ||
} | ||
|
||
export default todos |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
@import "mixins.scss"; | ||
@import "variables.scss"; | ||
@import "base.scss"; | ||
@import "sidebar.scss"; | ||
@import "content.scss"; | ||
@import "pipeline.scss"; | ||
@import "data-table.scss"; | ||
@import "utilization.scss"; | ||
@import "my-staffing.scss"; | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.