minhnt-dev: oonly ssr fix

This commit is contained in:
MoreStrive
2024-06-24 16:46:59 +07:00
parent e151dda2ad
commit ab3419bd5f
7 changed files with 89 additions and 72 deletions
+21 -9
View File
@@ -26,9 +26,7 @@ useHead({
<div>
<NuxtLayout>
<NuxtLoadingIndicator />
<ErrorBoundary>
<NuxtErrorBoundary>
<template #error="{ error }">
<div class="text-center my-8">
<h2 class="mb-2">404</h2>
@@ -38,14 +36,28 @@ useHead({
trang chủ</button>
</div>
</template>
</ErrorBoundary>
<ScrollToTop />
</NuxtErrorBoundary>
<KeepAlive>
<NuxtPage />
</KeepAlive>
</NuxtLayout>
</div>
</a-config-provider> -->
<NuxtLayout>
<KeepAlive>
<NuxtPage />
</KeepAlive>
</NuxtLayout>
<NuxtLoadingIndicator />
<NuxtErrorBoundary>
<template #error="{ error }">
<div class="text-center my-8">
<h2 class="mb-2">404</h2>
<p class="mb-3">Trang không tồn tại.</p>
<p v-if="utils.isDev()">{{ error }}</p>
<button @click="resolveError(error)" type="button" class=" p-2 border focus:outline-none border-blue text-blue-7 hover:(bg-blue text-white) rounded-lg transition-colors">Về
trang chủ</button>
</div>
</template>
</NuxtErrorBoundary>
<KeepAlive>
<NuxtPage />
</KeepAlive>
</NuxtLayout>
</template>