-
Notifications
You must be signed in to change notification settings - Fork 28
Added error Page #47
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
base: dev
Are you sure you want to change the base?
Added error Page #47
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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} /> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make it as a persisted route. Just change this to |
||
| <Redirect to="/profile" /> | ||
| <Route component={NotFoundPage} /> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change this line to |
||
| </Switch> | ||
| <Footer /> | ||
| </BrowserRouter> | ||
| ); | ||
| } | ||
|
|
||
| export default App; | ||
| export default App; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
|
|
||
| //Add route for error page... | ||
| // <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' | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Imports outside of the
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To add an Image, create a directory called |
||
| const Error = () => { | ||
| const mystyle = { | ||
| color: "white", | ||
| backgroundColor: "DodgerBlue", | ||
| padding: "10px", | ||
| fontFamily: "Arial" | ||
| }; | ||
| return ( | ||
| <> | ||
| <div className="setStyle2"> | ||
| <h1 style={mystyle}>404 Error Page</h1> | ||
| {/* <p>Sorry this page is not valid</p> */} | ||
| <NavLink to ="/">Take Me Back To Where I Came From</NavLink> | ||
| <img src = {Logo} width = "500" alt ="error-screen-desktop.png"/> | ||
| </div> | ||
| </> | ||
| ); | ||
| }; | ||
| export default Error; | ||
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';