-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat: add redirect to homepage for invalid URLs #381
feat: add redirect to homepage for invalid URLs #381
Conversation
✅ Deploy Preview for delightful-daifuku-a9f6ea ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
🎉 Thank you @RachitSahu26 for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better.
Hey @AlfiyaSiddique if i have made any mistake then tell me redirect.mp4 |
@RachitSahu26 make the 404 appear for some more time at least 2 seconds. It's too fast. The user should know that the page is 404 and then redirect |
okay i will do but could you please add level 3 label @AlfiyaSiddique |
@RachitSahu26 not a level3 PR. Give level2 |
amzing.1.mp4now i have increased redirect time @AlfiyaSiddique |
please merge it now |
What does this PR do?
This PR adds a redirect functionality to the homepage when users attempt to access invalid URLs. It enhances user experience by ensuring that users are guided back to the main page instead of seeing a 404 error page. This change addresses the issue of handling incorrect routes effectively.
Redirect Functionality: Added logic in the routing configuration of the App.jsx file to handle invalid URLs by redirecting them to the homepage.
Updated NotFound Page: Enhanced the NotFound component to inform users that they can navigate back to the homepage, providing a clear call-to-action with a button.
Fixes # #348
Uploading redirect.mp4…
How should this be tested?
Checklist
Required
console.logs