Skip to content
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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

Madhupatel08
Copy link
Collaborator

Hey @HarshCasper
this is PR for #38

Copy link
Owner

@HarshCasper HarshCasper left a 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';
Copy link
Owner

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} />
Copy link
Owner

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'
Copy link
Owner

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'
Copy link
Owner

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} />
Copy link
Owner

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 />

@HarshCasper
Copy link
Owner

Hi @madhup01

Are there any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants