Implemented navigation through website

This commit is contained in:
2025-01-10 16:37:12 +00:00
parent d7e2e0f9f3
commit 822fbcbba3
7 changed files with 57 additions and 5 deletions

11
src/lib/navigation.js Normal file
View File

@@ -0,0 +1,11 @@
import { goto } from "$app/navigation";
import { error } from '@sveltejs/kit';
export const navigation = {
toHome: () => goto("/"),
toAbout: () => goto("/about"),
toContact: () => goto("/contact"),
to404: () => {
throw error(404, 'Page not found');
}
};