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

feature: added the 404 page #2

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ To get a local copy up and running follow these simple steps.
- [x] Added the navbar
- [ ] Change Licence to MIT
- [ ] Add Linting Support
- [ ] Create 404 Page
- [x] Create 404 Page
- [ ] Create SignUp
- [ ] Create Login
- [ ] Create Homepage
Expand Down Expand Up @@ -164,7 +164,7 @@ Distributed under the Apache License. See `LICENSE.txt` for more information.
## Acknowledgments

These are list of resources that we find helpful and would like to give credit to.

* [dribbble](https://dribbble.com)
* [Img Shields](https://shields.io)
* [Font Awesome](https://fontawesome.com)
* [React Icons](https://react-icons.github.io/react-icons/search)
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Link-A-Share</title>
</head>
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshot.png
Binary file not shown.
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { Routes, Route } from 'react-router-dom';
import Home from './Pages/Home';

import PageNotFound from './Pages/PageNotFound';


function App() {
return (
<Routes>
<Route path='/' element={<Home />} />
<Route path='*' element={<PageNotFound />} />
</Routes>
)
}
Expand Down
Binary file added src/Assets/img/jaconda-error-404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/Assets/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logo from "./img/logo.png";

import errorImg from "./img/jaconda-error-404.png";
export {
logo,
errorImg,
}
4 changes: 2 additions & 2 deletions src/Pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const Home = () => {
<Navbar />
</header>
<div className="flex justify-center items-center h-screen flex-col">
<div className='font-gotham text-primary text-9xl md:lg sm:md'>Linkashare</div>
<p>timi gbetrabaye from here</p>
<div className='font-gotham text-primary lg:text-9xl md:lg sm:md'>Linkashare</div>
<p>About to start work here next</p>
</div>
</main>
</Fragment>
Expand Down
31 changes: 31 additions & 0 deletions src/Pages/PageNotFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Navbar from "../Components/Navbar";
import { errorImg } from "../Assets/index";
import { useNavigate } from "react-router-dom";
const PageNotFound = () =>{
let navigate = useNavigate();
const handleHome = () => {
navigate('/')
}
return(
<div className="">
<header>
<Navbar />
</header>
<div className="flex text-center bg-dark lg:text-left text-textColor h-screen
pt-[6rem] lg:flex-row lg:justify-between md:pl-0
md:flex md:justify-center md:items-center md:flex-col md:text-center
sm:flex sm:flex-col sm:text-center
md:pt-0 sm:pt-[9rem]">
<div className="lg:pl-[3rem]">
<div className="text-[3rem] font-gotham text-primary">Oops!</div>
<p className="lg:w-[80%] py-2">We could not find that page. Please go back to the home page</p>
<button onClick={handleHome} className="bg-primary px-5 py-3 mt-3 rounded-full">Back To Homepage</button>
</div>
<div className="hidden lg:flex xl:flex pt-9 md:hidden sm:hidden">
<img src={errorImg} alt="page not found" />
</div>
</div>
</div>
)
}
export default PageNotFound;