error.vue 776 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <script setup lang="ts">
  2. import type { NuxtError } from '#app'
  3. defineProps<{
  4. error: NuxtError
  5. }>()
  6. useHead({
  7. htmlAttrs: {
  8. lang: 'en',
  9. },
  10. })
  11. useSeoMeta({
  12. title: 'Page not found',
  13. description: 'We are sorry but this page could not be found.',
  14. })
  15. const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'))
  16. const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('docs'), {
  17. server: false,
  18. })
  19. provide(navigationInjectionKey, navigation)
  20. </script>
  21. <template>
  22. <UApp>
  23. <AppHeader />
  24. <UError :error="error" />
  25. <AppFooter />
  26. <ClientOnly>
  27. <LazyUContentSearch
  28. :files="files"
  29. :navigation="navigation"
  30. />
  31. </ClientOnly>
  32. </UApp>
  33. </template>