Skip to content

Instantly share code, notes, and snippets.

@mercs600
Last active March 29, 2020 14:31
Show Gist options
  • Save mercs600/2ebd6dfa16ea3437045872d4cc08dfd9 to your computer and use it in GitHub Desktop.
Save mercs600/2ebd6dfa16ea3437045872d4cc08dfd9 to your computer and use it in GitHub Desktop.
nuxt-ssr-exercise-3_error.vue
<template>
<div class="container">
<h1 v-if="error.statusCode === 404">Page not found</h1>
<h1 v-else>{{ error.statusCode }} An error occurred: {{ error.message }}</h1>
<nuxt-link to="/">Home page</nuxt-link>
</div>
</template>
<script>
export default {
props: {
error: {
type: Object,
required: true
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment