-
Notifications
You must be signed in to change notification settings - Fork 102
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
Added a custom 404 not found page #210
Added a custom 404 not found page #210
Conversation
✅ Deploy Preview for fossc 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 🙏🏻 for contributing to progress-tracker by @FOSS-Community. Looking Forward for more contributions.
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.
Hey @parthrc , Thanks for the PR, there is an issue, the 404 Error Image is not rendering.
src/pages/PageNotFound.jsx
Outdated
<div className="flex text-white flex-col items-center justify-center p-10"> | ||
<img | ||
className="w-96 mx-auto " | ||
src="src\assets\img\page_not_found_img\404-error.png" |
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 it to src="src/assets/img/page_not_found_img/404-error.png"
to fix this error
@Mr-Sunglasses Hey, i did the changes. |
@@ -0,0 +1,23 @@ | |||
import { Link } from "react-router-dom"; | |||
|
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.
So we need to import the image to render it instead of passing it directly to src
use this
import logo_404 from "./assets/img/page_not_found_img/error.png"
src/pages/PageNotFound.jsx
Outdated
<div className="flex text-white flex-col items-center justify-center p-10"> | ||
<img | ||
className="w-96 mx-auto " | ||
src="src/assets/img/page_not_found_img/error.png" |
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 it to src={logo_404}
@Mr-Sunglasses seems to be fixed now, also working on netlify deploy preview |
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.
Awesome work @parthrc , 🍻 Thanks for solving this major issue 🙏🏻
@Mr-Sunglasses , thank you so much for the oppurtunity, this is my first ever open source contribution, hopefully many more to come 💯 |
Description
Added a custom "404 page not found" page. Issue #209. No dependencies required.
Fixes #209
Type of change