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
27 changes: 27 additions & 0 deletions src/Pages/NotFound/NotFound.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { Link } from 'react-router-dom';

function NotFound() {
return (
<div className="bg-kitchen-blue min-h-screen flex items-center justify-center">
<div className="text-center text-white">
<h1 className="font-bold text-8xl leading-tight" data-testid="not-found-404">404</h1>
<p className="mt-4 text-4xl" data-testid="not-found-message">La page demandée n&apos;existe pas</p>
<div className="mt-6">
<Link to="/dashboard">
<button
type="submit"
className="w-3/6 p-2.5 rounded-2xl bg-kitchen-yellow text-white hover:bg-[#e0d38f] transition duration-300"
>
<div className="text-lg font-bold text-kitchen-blue">
Page d&apos;accueil
</div>
</button>
</Link>
</div>
</div>
</div>
);
}

export default NotFound;
2 changes: 2 additions & 0 deletions src/Pages/PosRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Loading from './Loading/Loading';
import Dashboard from './Dashboard/Dashboard';
import Pay from './Pay/Pay';
import Layout from './Layout';
import NotFound from './NotFound/NotFound';

import { DndProvider } from 'react-dnd'
import { HTML5Backend } from 'react-dnd-html5-backend'
Expand Down Expand Up @@ -76,6 +77,7 @@ function PosRouter() {
<Route index element={<Dashboard orders={orders} setOrders={setOrders} orderDetails={orderDetails} setOrderDetails={setOrderDetails} />} />
<Route path="/dashboard/pay" element={<Pay />} />
</Route>
<Route path="*" element={<NotFound />} />
</Routes>
</BrowserRouter>
</DndProvider>
Expand Down
Loading