Add a 404 page to the standard open saas template (#281)

* Add a 404 page to the standard open saas template

* Revert "Add a 404 page to the standard open saas template"

This reverts commit c9e407323286aa6c0b2ba618abc4c9f63bdb3dcd.

* reinstate 404 page after mistake with patch script
This commit is contained in:
Cameron Blackwood 2024-10-14 09:34:00 +01:00 committed by GitHub
parent 18f6c89659
commit 530e87a6b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

View File

@ -309,6 +309,11 @@ page AdminUIButtonsPage {
authRequired: true,
component: import AdminUI from "@src/admin/elements/ui-elements/ButtonsPage"
}
route NotFoundRoute { path: "*", to: NotFoundPage }
page NotFoundPage {
component: import { NotFoundPage } from "@src/client/components/NotFoundPage"
}
//#endregion
//#region Contact Form Messages

View File

@ -0,0 +1,19 @@
import React from 'react';
import { Link } from 'react-router-dom';
export function NotFoundPage() {
return (
<div className='flex items-center justify-center min-h-screen'>
<div className='text-center'>
<h1 className='text-6xl font-bold mb-4'>404</h1>
<p className='text-lg text-bodydark mb-8'>Oops! The page you're looking for doesn't exist.</p>
<Link
to='/'
className='inline-block px-8 py-3 text-white bg-primary rounded-lg hover:bg-secondary transition duration-300'
>
Go Back Home
</Link>
</div>
</div>
);
}