-
Notifications
You must be signed in to change notification settings - Fork 28
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 error Page #47
base: dev
Are you sure you want to change the base?
Added error Page #47
Conversation
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.
Tiny changes required because I merged the dev
branch into yours. Good Work overall!
Once you are done, squash all your commits and add the commit message: feat: Add the Error 404 page
@@ -6,18 +6,19 @@ import Footer from "./Components/Footer/Footer"; | |||
import Profile from "./Pages/UserProfile"; | |||
import profileData from "./Data/profileData.json"; | |||
import "./styles.css"; | |||
import NotFoundPage from './pages/NotFoundPage'; |
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 line to import Error from './Error.js';
|
||
function App() { | ||
return ( | ||
<BrowserRouter> | ||
<Header /> | ||
<Switch> | ||
<Route path="/profile" component={Profile} /> | ||
<Redirect to="/profile" /> | ||
<Route component={NotFoundPage} /> |
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 line to <Route component={Error} />
// import Logo from '../logo.png'; | ||
import React from "react"; | ||
import {NavLink} from "react-router-dom"; | ||
import Logo from './design/error-screen/sreens/error-sreen-desktop.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.
Imports outside of the src
directory are not yet supported.
// import Logo from '../logo.png'; | ||
import React from "react"; | ||
import {NavLink} from "react-router-dom"; | ||
import Logo from './design/error-screen/sreens/error-sreen-desktop.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.
To add an Image, create a directory called assets
, in the src
, add the image there and reference it from there.
@@ -6,18 +6,19 @@ import Footer from "./Components/Footer/Footer"; | |||
import Profile from "./Pages/UserProfile"; | |||
import profileData from "./Data/profileData.json"; | |||
import "./styles.css"; | |||
import NotFoundPage from './pages/NotFoundPage'; | |||
|
|||
function App() { | |||
return ( | |||
<BrowserRouter> | |||
<Header /> | |||
<Switch> | |||
<Route path="/profile" component={Profile} /> |
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 it as a persisted route. Just change this to <Route path="/profile" component={Profile} exact />
Hi @madhup01 Are there any updates on this? |
Hey @HarshCasper
this is PR for #38