Files
web/app/error.vue
2026-07-01 10:59:23 +07:00

61 lines
1.3 KiB
Vue

<script setup>
const props = defineProps({
error: Object,
});
console.error(props.error);
const { $createMeta } = useNuxtApp();
const description =
"Rất tiếc! Có vẻ như đã xảy ra sự cố. Vui lòng thử lại hoặc liên hệ quản trị viên nếu lỗi tiếp tục.";
useHead(
$createMeta({
title: props.error.message,
description,
image: "/favicon.svg",
type: "website",
}),
);
</script>
<template>
<div
class="container h-dvh is-flex is-gap-2 is-flex-direction-column is-justify-content-center is-align-items-center"
>
<Icon
name="material-symbols:warning-rounded"
:size="50"
class="has-text-danger-60"
/>
<h1 class="font-semibold is-size-3">Đã xảy ra sự cố</h1>
<p class="has-text-grey">
{{ description }}
</p>
<div class="buttons">
<a
href=""
class="button"
>
<span class="icon">
<Icon
name="material-symbols:refresh-rounded"
:size="18"
/>
</span>
<span>Thử lại</span>
</a>
<a
href="/"
class="button"
>
<span class="icon">
<Icon
name="material-symbols:home-outline-rounded"
:size="18"
/>
</span>
<span>Trang chủ</span>
</a>
</div>
</div>
</template>