-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetching data for admin page using redux #125
base: master
Are you sure you want to change the base?
Conversation
src/redux/actions/adminActions.js
Outdated
|
||
export const fetchCategory =()=>{ | ||
return dispatch =>{ | ||
axios.get('https://jsonplaceholder.typicode.com/posts') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Subhang23 I dont understand from which url are you fetching/posting the categories too. I requested changes before that time you have resolved without making any change.
@Subhang23 Attach the surge link. Please follow PR template strictly. |
src/redux/actions/adminActions.js
Outdated
}; | ||
|
||
export const deleteCategory =(e)=> (dispatch,getState) =>{ | ||
const config = tokenConfig(getState); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to create a new variable config. directly use tokenConfig(getState)
in the axios call
@Subhang23 Make the above changes. A lot of places the code can be improved but I guess that can be done later on. |
Fixes #112
Changes: Added fetch ,add and delete category