error.vue 633 B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <main>
  3. <div v-if="error">
  4. <CommonErrorNotFound v-if="error.statusCode === 404" />
  5. <div v-else>Une erreur s'est produite...</div>
  6. </div>
  7. <nuxt-link to="/">
  8. <v-btn class="ot-button"> Retour </v-btn>
  9. </nuxt-link>
  10. </main>
  11. </template>
  12. <script setup lang="ts">
  13. import type { NuxtError } from '#app'
  14. const error: Ref<NuxtError | null | undefined> = useError()
  15. </script>
  16. <style lang="scss">
  17. .ot-button {
  18. border-radius: 6px;
  19. height: 48px;
  20. font-size: 0.8rem;
  21. font-weight: 300;
  22. background: var(--secondary-color) !important;
  23. color: var(--on-neutral-color) !important;
  24. }
  25. </style>