Skip to content

Commit

Permalink
🎨 fix error page
Browse files Browse the repository at this point in the history
  • Loading branch information
k-urtica committed Feb 18, 2024
1 parent 73af817 commit 40a2494
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 38 deletions.
24 changes: 24 additions & 0 deletions src/error.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<template>
<div class="bg-zinc-900 grid min-h-screen place-content-center">
<div class="container mx-auto max-w-5xl text-center">
<h1 class="text-zinc-300 font-bold text-2xl py-5">{{ title }}</h1>
<AppLink to="/" class="text-zinc-300 underline">Back to Top</AppLink>
</div>
</div>
</template>

<script setup lang="ts">
const error = useError();
const title = ref('Error');
if (error.value?.statusCode === 404) {
title.value = '404 Not Found';
} else {
title.value = 'Unknown Error';
}
useHead({
title: title.value,
});
</script>
38 changes: 0 additions & 38 deletions src/layouts/error.vue

This file was deleted.

0 comments on commit 40a2494

Please sign in to comment.