Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error page #206

Merged
merged 3 commits into from
Mar 31, 2024
Merged
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
67 changes: 67 additions & 0 deletions src/assets/external/balloon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,12 @@ export {
MeetTheTeamBuildingLeft,
MeetTheTeamBuildingRight,
};

/*
*
* 404 / Coming Soon SVGs
*
*/
import ExternalBalloon from './external/balloon.svg';

export { ExternalBalloon };
43 changes: 43 additions & 0 deletions src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { ExternalBalloon, MeetTheTeamBuildingLeft } from "@assets";

const ErrorPage: React.FC = () => {
return (
<section
className="stacked -mb-24 bg-cover relative"
style={{
background: "linear-gradient(180deg, #FDDDB7 0%, #CBAAF4 328.99%, #8B6AB6 494.83%)",
}}
>
<img
src={ExternalBalloon}
alt="Balloon"
className="absolute top-0 right-0 w-1/4 max-w-md"
/>
<img
src={MeetTheTeamBuildingLeft}
alt="Building"
className="absolute bottom-0 left-0 w-1/4 max-w-md"
/>
<div className="container mx-auto px-4 flex justify-center items-center min-h-screen">
<div className="text-center">
<h2 className="font-bold text-white drop-shadow-md mb-4">
404 Error
</h2>

<p className="text-white drop-shadow-md mb-4">
Are you supposed to be here? 🤔
</p>

<a
href="/"
className="text-white drop-shadow-md underline hover:text-deepMarine hover:no-underline"
>
Return to the homepage
</a>
</div>
</div>
</section>
);
};

export { ErrorPage };
7 changes: 7 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@
*
*/
export { Landing } from './Landing';

/*
*
* @page 404
*
*/
export { ErrorPage } from './404';
13 changes: 7 additions & 6 deletions src/utils/Router.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import { Landing } from '@pages'
import { ErrorPage, Landing } from '@pages'

const Router = () => (
<BrowserRouter>
<Routes>
<Route path="/" element={<Landing />} />
</Routes>
</BrowserRouter>
<BrowserRouter>
<Routes>
<Route path="/" element={<Landing />} />
<Route path="*" element={<ErrorPage />} />
</Routes>
</BrowserRouter>
);

export { Router };
Loading