File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import type { NuxtError } from ' #app' ;
3
+
4
+ type Props = {
5
+ error: NuxtError ;
6
+ };
7
+ const props = defineProps <Props >();
8
+
9
+ const image = computed (
10
+ () => ` https://httpducks.com/${props .error .statusCode }.jpg `
11
+ );
12
+
13
+ const handleError = () => clearError ({ redirect: ' /' });
14
+ useHead ({
15
+ title: props .error .statusCode .toString ()
16
+ });
17
+ </script >
18
+
19
+ <template >
20
+ <NuxtLayout name =" public" >
21
+ <div
22
+ class =" mt-20 flex w-full items-center justify-center gap-16 max-lg:flex-col lg:mt-36 lg:gap-32" >
23
+ <h2
24
+ class =" font-ichack text-red-ic lg:text-horizontal text-6xl lg:rotate-180 lg:text-8xl" >
25
+ Error
26
+ </h2 >
27
+ <div class =" flex flex-col items-center gap-5" >
28
+ <img :src =" image" :alt =" error.statusMessage" class =" max-w-96" />
29
+ <p v-if =" error.statusMessage" >{{ error.statusMessage }}</p >
30
+ <p class =" cursor-pointer" @click =" handleError" >
31
+ Click here to return back to home page
32
+ </p >
33
+ </div >
34
+ <h2
35
+ class =" font-ichack text-red-ic lg:text-horizontal text-6xl lg:text-8xl" >
36
+ Error
37
+ </h2 >
38
+ </div >
39
+ </NuxtLayout >
40
+ </template >
You can’t perform that action at this time.
0 commit comments