-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix-#249: Now authenticate users able to create blog post. #250
fix-#249: Now authenticate users able to create blog post. #250
Conversation
…user from userState when tokens gets expired + correction in error toastify
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Can you use toast.promise to show different states (pending, success, error) of the API request.
Sure. |
@0xmohitsen @Sukomal07 kindly fix this |
Ok |
@0xmohitsen change your code in this way `
}; |
…d error while creating a blog post
Added this code and tested. |
Summary
This PR allow authenticated users to create blog posts
Description
This PR addresses an issue where authenticated users were unable to create blog posts despite having valid and unexpired tokens. The problem manifested as an error toast displaying "Something went wrong. Please try again later!" when authenticate users attempted to create a post.
Now authenticate users can create blog post until and unless tokens are valid and unexpired. And if tokens get expired or invalid, we simply display toastify "Your session has expired, please login again!" and redirects to homepage with conditional rendering.
Issue(s) Addressed
Closes #249
Prerequisites