-
Notifications
You must be signed in to change notification settings - Fork 220
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
[BUG] UI not updated on post Deletion #633
Comments
@ksraj123 and @AuraOfDivinity, I'd like to fix this issue. Could you please assign it to me? |
@trinadhmoganti I don't think anyone else is working on this issue! So, Maybe go ahead with solving this. |
I would like to fix this bug . Can you please assign this issue to me? |
To me, it looksooks like it's an issue with state. I'm thinking that updating the frontend state after delete success api call should solve this issue. |
I see that in postActions, we're dispatching getAllPost() which is trying to get all posts from the API. I think instead of trying to get all posts again, what we may do is use .filter() to remove the deleted post from the state on success. @AuraOfDivinity, @ksraj123, @Rupeshiya, what do you say? |
@lazycipher I would like to work on this issue, |
Fixed in some PR! |
Describe the bug
The UI does not update when a post is deleted. Request to delete the post to backend works as expected.
Steps to Reproduce
Step 1: Create a post
Step 2: Hit the API through postman to fetch the list of all posts, the post we created in step 1 would be in this list
Step 3: Delete the post though frontend
Step 4: Hit the API through postman to fetch the list of all posts, the post we created in step 1 would NOT be in the list but it's still visible on the frontend.
Expected behavior
The UI should update on the successful deletion of the post.
Screenshots
Desktop:
Additional context
Hacktoberfest
The text was updated successfully, but these errors were encountered: