Skip to content
Open
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
28 changes: 28 additions & 0 deletions RestroHub-FrontEnd/src/pages/public/NotFound.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// src/pages/public/NotFound.jsx
import { Link } from "react-router-dom";

const NotFound = () => {
return (
<div className="flex min-h-screen flex-col items-center justify-center bg-gray-100 px-4 dark:bg-gray-900">
<div className="text-center">
<h1 className="text-9xl font-extrabold text-blue-600 dark:text-blue-400">
404
</h1>
<h2 className="mt-4 text-2xl font-bold text-gray-900 dark:text-white">
Page Not Found
</h2>
<p className="mt-2 text-gray-500 dark:text-gray-400">
Sorry, the page you are looking for does not exist or has been moved.
</p>
<Link
to="/"
className="mt-8 inline-block rounded-lg bg-blue-600 px-6 py-3 font-medium text-white transition hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600"
>
Back to Home
</Link>
</div>
</div>
);
};

export default NotFound;
3 changes: 2 additions & 1 deletion RestroHub-FrontEnd/src/routes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Login from '../pages/public/Login';
import Register from '../pages/public/Register';
import ForgotPassword from '../pages/public/ForgotPassword';
import PrivacyPolicy from '../pages/public/PrivacyPolicy';
import NotFound from '../pages/public/NotFound';

// Customer Pages
import RestaurantMenu from '../pages/customer/RestaurantMenu';
Expand Down Expand Up @@ -69,7 +70,7 @@ const AppRoutes = () => {
</Route>

{/* ========== 404 FALLBACK ========== */}
<Route path="*" element={<Navigate to="/" replace />} />
<Route path="*" element={<NotFound />} />
</Routes>
);
};
Expand Down