Skip to content

Commit 5091965

Browse files
committed
NotfoundPage
1 parent 436dd04 commit 5091965

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

public/data/Riddhi050803.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@
44
"bio": "I’m a passionate Computer Science Engineering student at Indira Gandhi Delhi Technical University for Women (IGDTUW), actively exploring and contributing to the world of web development, open-source, and problem-solving.",
55
"avatar": "https://github.com/Riddhi050803.png",
66
"portfolio": "https://riddhirustagiportfolio-riddhi050803s-projects.vercel.app/",
7-
"skills": ["HTML", "CSS", "JavaScript","Bootstrap", "Tailwind", "React js", "Redux", "Mongo DB", "Express js", "Node js", "UI/UX"],
7+
"skills": [
8+
"HTML",
9+
"CSS",
10+
"JavaScript",
11+
"Bootstrap",
12+
"Tailwind",
13+
"React js",
14+
"Redux",
15+
"Mongo DB",
16+
"Express js",
17+
"Node js",
18+
"UI/UX"
19+
],
820
"social": {
921
"GitHub": "https://github.com/Riddhi050803",
1022
"Twitter": "https://twitter.com/RiddhiRustagii",

src/App.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import ProjectShowcase from './Page/ProjectShowcase.jsx';
1010
import ResumeBuilder from './Page/ResumeBuilder.jsx';
1111
import Resources from './Page/Resources.jsx';
1212
import Discussions from './Page/Discussions.jsx';
13+
import NotFoundPage from './Page/NotFoundPage.jsx';
1314

1415
function App() {
1516
return (
@@ -70,6 +71,8 @@ function App() {
7071
<Route path="/ResumeBuilder" element={<ResumeBuilder />} />
7172
<Route path="/Resources" element={<Resources />} />
7273
<Route path="/Discussions" element={<Discussions />} />
74+
{/* Catch-all route for 404 page */}
75+
<Route path="*" element={<NotFoundPage />} />
7376
</Routes>
7477
</BrowserRouter>
7578
);

src/Page/NotFoundPage.jsx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react';
2+
import { useNavigate } from 'react-router-dom';
3+
4+
const NotFoundPage = () => {
5+
const navigate = useNavigate();
6+
7+
const handleHomeClick = () => {
8+
navigate('/');
9+
};
10+
11+
return (
12+
<div
13+
className="flex h-screen w-full items-center justify-center bg-cover bg-center"
14+
style={{
15+
backgroundImage: `url('https://img.freepik.com/free-vector/404-error-with-man-thinking_24908-77772.jpg?t=st=1731744528~exp=1731748128~hmac=45deb8996535d67e7b7e02a75f5eeff8388ef4d4a955f7288900dba090980121&w=740')`,
16+
backgroundSize: 'cover',
17+
height: '100vh',
18+
width: '100vw',
19+
}}
20+
>
21+
<div className="space-y-8 text-center">
22+
<h1 className="animate__animated animate__fadeInUp text-6xl font-extrabold text-white drop-shadow-2xl">
23+
Oops! Page Not Found
24+
</h1>
25+
26+
<button
27+
onClick={handleHomeClick}
28+
className="transform rounded-full bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 px-8 py-4 text-xl font-semibold text-white shadow-2xl transition-all duration-300 ease-in-out hover:scale-105"
29+
>
30+
Go to Home
31+
</button>
32+
</div>
33+
</div>
34+
);
35+
};
36+
37+
export default NotFoundPage;

0 commit comments

Comments
 (0)