From 2c6b1ebd46c620b99c0f42d936a73a3b32e3089a Mon Sep 17 00:00:00 2001 From: Darsh Shah Date: Fri, 24 Jan 2025 01:48:41 +0530 Subject: [PATCH 1/2] Updated the 404 Error Page --- src/App.jsx | 8 ++++---- src/Components/ErrorPageWithButton.jsx | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 src/Components/ErrorPageWithButton.jsx diff --git a/src/App.jsx b/src/App.jsx index 99d8d90b1..bf0d89665 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,5 +1,5 @@ // Enhanced App component with updated styles and layout -import React from 'react'; +import { React } from 'react'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import { motion } from 'framer-motion'; import NavbarCard from './Components/NavbarCard'; @@ -15,13 +15,14 @@ import VerticalTimeline from './Components/Timeline'; import Carousel from './Components/Carousel'; import Hero from './Components/Hero'; import Footer from "./Components/Footer" +import ErrorPageWithButton from './Components/ErrorPageWithButton'; const Homepage = () => { return (
- {/* Text Section between Hero and Carousel */} + {/* Text Section between Hero and Carousel */}

Welcome to Project X

@@ -37,8 +38,6 @@ const Homepage = () => { }; - - function App() { return (

@@ -51,6 +50,7 @@ function App() { } /> } /> } /> + } /> {/* } /> */} {/* } /> */} diff --git a/src/Components/ErrorPageWithButton.jsx b/src/Components/ErrorPageWithButton.jsx new file mode 100644 index 000000000..d9a3f5caf --- /dev/null +++ b/src/Components/ErrorPageWithButton.jsx @@ -0,0 +1,26 @@ +import React from "react"; +import { useNavigate } from "react-router-dom"; + +const ErrorPageWithButton = () => { + const navigate = useNavigate(); + + return ( +
+

+ 404! +

+

+ Oops, Page Not Found! +

+ +
+ ); +}; + +export default ErrorPageWithButton; From ef4df9454aa2b16d3d59c6369b5b25a3827fd738 Mon Sep 17 00:00:00 2001 From: Darsh Shah <161367760+Darsh-KShah@users.noreply.github.com> Date: Fri, 24 Jan 2025 01:53:04 +0530 Subject: [PATCH 2/2] Updated App.jsx Little changes --- src/App.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index bf0d89665..2da0e4b84 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,5 +1,5 @@ // Enhanced App component with updated styles and layout -import { React } from 'react'; +import React from 'react'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import { motion } from 'framer-motion'; import NavbarCard from './Components/NavbarCard'; @@ -38,6 +38,8 @@ const Homepage = () => { }; + + function App() { return (
@@ -65,4 +67,4 @@ function App() { export default App; -{/*
*/ } \ No newline at end of file +{/*
*/ }