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

fixes #127 - add notfound page #128

Merged
merged 1 commit into from
May 16, 2024
Merged
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
2 changes: 2 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import About from "./Pages/About";

import "./index.css";
import Signup from "./Pages/Signup";
import NotFound from "./Pages/NotFound";

const App = () => {
return (
Expand All @@ -31,6 +32,7 @@ const App = () => {
<Route path="/cart" element={<CartWithFooter />} />
<Route path="/wishlist" element={<WishlistWithFooter />} />
<Route path="/about" element={<About/>} />
<Route path="*" element={<NotFound/>} />

</Routes>
</Router>
Expand Down
20 changes: 20 additions & 0 deletions src/Pages/NotFound.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Link } from "react-router-dom";

function NotFound() {
return (
<main className="flex flex-col md:flex-col xl:flex-row w-full mx-auto mt-20 sm:w-11/12 md:w-3/4 lg:w-3/4 xl:w-3/4 px-4 py-8 sm:px-6 md:px-8 lg:px-10 rounded-3xl bg-gradient-to-b from-grey-200 to-white-300">
<div className="flex flex-col justify-center items-center px-4 py-6 md:px-8 lg:px-2 text-gray-700">
<h1 className="text-3xl sm:text-4xl md:text-5xl mb-4 font-Poppins">
404 - Not Found!
</h1>
<p className="text-base items-center sm:text-lg md:text-xl mt-8 mb-10 text-center">
Sorry! the page your are looking for was either not found or does not exist. Try refreshing the page or click the button below to go back to the home page.
</p>
<Link to="/"><button className="bg-blue-950 w-40 text-white px-4 py-2 rounded">Go to Home</button></Link>
</div>

</main>
)
}

export default NotFound;