remove bloat fonts, get rid of svelte-i18n
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
14
app/src/hooks.server.js
Normal file
14
app/src/hooks.server.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { redirect } from "@sveltejs/kit";
|
||||
|
||||
/** @type {import('@sveltejs/kit').HandleServerError} */
|
||||
export async function handleError({ error, status }) {
|
||||
// for unknown routes, just redirect to /
|
||||
if (status === 404) {
|
||||
return redirect(303, "/");
|
||||
}
|
||||
|
||||
// for other errors, pass the message which will be used by the error page
|
||||
return {
|
||||
message: `${error}`,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user