Skip to content

Commit

Permalink
Add 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziosestito committed Apr 11, 2022
1 parent bb11fc8 commit ba54bc4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
37 changes: 37 additions & 0 deletions assets/js/components/NotFound/NotFound.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import { useNavigate } from 'react-router-dom';

import Button from '@components/Button';
import TrentoLogo from '../../../static/trento-icon.png';

const NotFound = () => {
const navigate = useNavigate();

return (
<main className="bg-white relative overflow-hidden h-screen relative">
<div className="container mx-auto h-screen pt-32 md:pt-0 px-6 z-10 flex items-center justify-between">
<div className="container mx-auto px-6 flex flex-col-reverse lg:flex-row justify-between items-center relative">
<div className="w-full mb-16 md:mb-8 text-center lg:text-left">
<h1 className="font-light font-sans text-center lg:text-left text-5xl lg:text-8xl mt-12 md:mt-0 text-gray-700">
Sorry,<br></br>the page is in antoher castle.
</h1>
<Button
className="px-2 py-2 w-36 mt-16"
type="secondary"
onClick={() => {
navigate(`/`);
}}
>
Go back home
</Button>
</div>
<div className="block w-full mx-auto md:mt-0 relative max-w-md lg:max-w-2xl">
<img src={TrentoLogo} />
</div>
</div>
</div>
</main>
);
};

export default NotFound;
3 changes: 3 additions & 0 deletions assets/js/components/NotFound/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import NotFound from './NotFound';

export default NotFound;
2 changes: 2 additions & 0 deletions assets/js/trento.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import DatabasesOverview from '@components/DatabasesOverview';
import SapSystemDetails from './components/SapSystemDetails/SapSystemDetails';
import DatabaseDetails from './components/DatabaseDetails';
import ChecksCatalog from '@components/ChecksCatalog';
import NotFound from '@components/NotFound';

const App = () => {
return (
Expand Down Expand Up @@ -51,6 +52,7 @@ const App = () => {
<Route path="databases/:id" element={<DatabaseDetails />} />
<Route path="clusters/:clusterID" element={<ClusterDetails />} />
</Route>
<Route path="*" element={<NotFound />} />
</Routes>
</BrowserRouter>
</Provider>
Expand Down

0 comments on commit ba54bc4

Please sign in to comment.