-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
34 lines (30 loc) · 787 Bytes
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<template>
<div>
<!-- <VitePwaManifest /> -->
<NuxtLoadingIndicator
:color="'blue'"
:duration="2000"
:throttle="200"
/>
<NuxtLayout>
<NuxtErrorBoundary @error="errorLogger">
<template #error="{ error }">
<button @click="handleError">Clear errors</button>
</template>
</NuxtErrorBoundary>
<NuxtPage/>
</NuxtLayout>
</div>
</template>
<script setup lang="ts">
import { clearError, useHead } from '#imports';
useHead({
titleTemplate: (titleChunk) => {
return titleChunk ? `${titleChunk} - Site Title` : 'Site Title';
}
});
const errorLogger = (error: any) => {
console.log('[app]', '[error]', error);
}
const handleError = () => clearError({ redirect: '/' });
</script>