Add NotFound route to App component for improved error handling in navigation

This commit is contained in:
becarta
2025-05-16 01:42:45 +02:00
parent 5a8bf790af
commit ac7c22ffec
2 changed files with 9 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
import Email from './routes/services/email.svelte';
import Security from './routes/services/security.svelte';
import Helpdesk from './routes/services/helpdesk.svelte';
import NotFound from './routes/NotFound.svelte';
import Footer from './components/Footer.svelte';
const routes = {
@@ -26,7 +27,8 @@
'/services/migrations': Migrations,
'/services/email': Email,
'/services/security': Security,
'/services/helpdesk': Helpdesk
'/services/helpdesk': Helpdesk,
'*': NotFound
};
</script>

View File

@@ -0,0 +1,6 @@
<script>
export let title = 'Page Not Found';
</script>
<h1>{title}</h1>
<p>The page you are looking for does not exist. Please check the URL or return to the <a href="/">homepage</a>.</p>