<template>
  <div v-if="error.statusCode === 404" class="error--page">
    <h1>{{ error.statusCode }}</h1>
    <p>{{ error.message }}</p>
    <nuxt-link :to="{ name: 'index' }">Home</nuxt-link>
  </div>
  <div v-else class="error--page">
    <h1>{{ error.statusCode }}</h1>
    <p>{{ error.message }}</p>
    <nuxt-link :to="{ name: 'index' }">Home</nuxt-link>
  </div>
</template>

<script>
export default {
  name: 'ErrorPage',
  layout: 'blank',
  props: {
    error: {
      required: true,
      type: Object,
      default: null
    }
  }
}
</script>
