Skip to content

Commit

Permalink
chore: redirect to error page
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax committed Jan 5, 2024
1 parent f41d0e1 commit 6094ba0
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
<template>
<template v-if="$services.length">
<Group
v-for="(group, key) in $services"
:key="key"
v-bind="group"
/>
</template>
<Message v-else :title="$t('service.not-found.title')">
<template #text>
<p>
{{ $t('service.not-found.description') }}
</p>
<p class="mt-1">
<a href="#" class="text-sky-500 hover:text-sky-800">{{ $t('service.not-found.action') }}</a>
</p>
</template>
</Message>
<Group
v-for="(group, key) in $services"
:key="key"
v-bind="group"
/>
<Update v-if="$settings.checkUpdates" />
</template>

<script setup lang="ts">
const { $services, $settings } = useNuxtApp()
if ($settings.error) {
throw createError({
message: $settings.error,
})
}
</script>

0 comments on commit 6094ba0

Please sign in to comment.