Skip to content

Commit

Permalink
frontend: Work On The Error Page This commit is for modified error pa…
Browse files Browse the repository at this point in the history
…ges that show if unknown route is accessed and then it give link to homepage by using link from react-router-dom and also remove display flex option from body Fixes: #21
  • Loading branch information
asmit27rai committed Jun 1, 2024
1 parent 6541b5c commit 9919572
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ a:hover {

body {
margin: 0;
display: flex;
/* display: flex; */
place-items: center;
min-width: 320px;
min-height: 100vh;
Expand Down
18 changes: 15 additions & 3 deletions frontend/src/pages/Error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@ import { Link } from 'react-router-dom';

function Error() {
return (
<div>
This page does not exist!
<Link to="home">Go back to homepage</Link>
<div className="flex flex-col items-center justify-center min-h-screen ">
<div className="text-center">
<h1 className="text-9xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-purple-400 via-pink-500 to-red-500 mb-4">
404
</h1>
<p className="text-2xl mb-8 text-white ">
This page does not exist!
</p>
<Link
to="/"
className="px-6 py-3 bg-blue-500 text-white rounded-full hover:text-black hover:bg-blue-600 hover:shadow-lg transform hover:scale-105 transition duration-300"
>
Go Back To Homepage
</Link>
</div>
</div>
);
}
Expand Down

0 comments on commit 9919572

Please sign in to comment.