File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ <script lang="ts" setup>
2
+ import type { NuxtError } from ' nuxt/app'
3
+
4
+ defineProps ({
5
+ error: Object as () => NuxtError ,
6
+ })
7
+
8
+ const { public : { appName } } = useConfig ()
9
+
10
+ useHead ({
11
+ titleTemplate : () => ` Error Page | ${appName } ` ,
12
+ })
13
+
14
+ const handle = () => {
15
+ clearError ({
16
+ redirect: ' /' ,
17
+ })
18
+ }
19
+ </script >
20
+
21
+ <template >
22
+ <AppLayout name =" minimal" >
23
+ <div class =" flex flex-col items-center gap-8" >
24
+ <template v-if =" error " >
25
+ <template v-if =" error ?.statusCode === 404 " >
26
+ <h1 class =" font-bold text-2xl text-center" >404</h1 >
27
+ <p v-if =" error" >
28
+ {{ error.message }}
29
+ </p >
30
+ </template >
31
+ <template v-else >
32
+ <h1 class =" font-bold text-2xl text-center" >Unknown error</h1 >
33
+ </template >
34
+ </template >
35
+ <CoreButton class =" border border-layer" @click =" handle" >Home</CoreButton >
36
+ </div >
37
+ </AppLayout >
38
+ </template >
You can’t perform that action at this time.
0 commit comments