Skip to content

Commit 5e365a4

Browse files
committed
chore(nuxt): enable ssr
1 parent 2fd2dc0 commit 5e365a4

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

components/Item.vue

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
<template>
2-
<Suspense>
3-
<template #default>
4-
<Component :is="component" v-bind="props" />
5-
</template>
6-
<template #fallback>
7-
<div class="p-4 flex gap-4">
8-
<div class="flex-shrink-0 flex">
9-
<div class="self-center w-16 h-16 overflow-hidden rounded-2xl border border-black/5 animate-pulse">
10-
<div class="bg-fg-dimmed h-full w-full" />
11-
</div>
12-
</div>
13-
<div>
14-
<h3 class="animate-pulse text-lg mt-1">
15-
<span class="inline-block min-h-[1em] w-[110px] flex-auto cursor-wait bg-fg-dimmed align-middle opacity-50 rounded" />
16-
</h3>
17-
<p class="animate-pulse text-sm text-black/50">
18-
<span class="inline-block min-h-[1em] w-[160px] flex-auto cursor-wait bg-fg-dimmed align-middle opacity-50 rounded" />
19-
</p>
20-
</div>
21-
</div>
22-
</template>
23-
</Suspense>
2+
<Component :is="component" v-bind="props" />
243
</template>
254

265
<script setup lang="ts">

components/service/Ping.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<ServiceBase v-bind="props">
33
<template #description>
4-
<template v-if="data && data?.time >= 0">
4+
<template v-if="data && data.time >= 0">
55
{{ $t('service.ping.description') }} <span class="border-b border-dashed">{{ data.time }} {{ $t('service.ping.units') }}</span>
66
</template>
77
<template v-else>
@@ -16,7 +16,7 @@ import type { PingService } from '~/types/services'
1616
1717
const props = defineProps<PingService>()
1818
19-
const { data, refresh } = await useFetch<{ time: number }>('/api/services/ping', { query: { id: props.id } })
19+
const { data, refresh } = useFetch('/api/services/ping', { query: { id: props.id } })
2020
const { pause } = useIntervalFn(refresh, props?.options?.interval || 10000, { immediate: true })
2121
2222
onBeforeUnmount(pause)

nuxt.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// https://nuxt.com/docs/api/configuration/nuxt-config
22
export default defineNuxtConfig({
3-
ssr: false,
43
modules: [
54
'@nuxtjs/tailwindcss',
65
'@nuxtjs/color-mode',

0 commit comments

Comments
 (0)