-
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
Adding Admin CRUD operations #165
Conversation
@ritwizsinha Review the PR. |
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.
Make these changes
@Subhang23 Couple of things:
|
src/components/Admin/Categories.js
Outdated
componentDidUpdate(){ | ||
this.props.fetchCategory(); | ||
} | ||
componentWillMount(){ |
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.
Change this to componentDidMount
. When fetching data from the server for the first time always use componentDidMount
return { | ||
categories: [...state.categories.categories,action.payload], | ||
status:200, | ||
statusType: "addCategory" |
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.
statusType
is not used anywhere remove it.
I did not understand point 1 |
@Subhang23 Resolve the conflicts. |
Fixes #112
Changes: Added options for the admin to view,update,add and delete categories
Surge Deployment Link: https://pr-165-sahaayak.surge.sh