<template>
  <div class="main-container" v-if="false">
    <h1 v-if="error.statusCode === 404">Page not found</h1>
    <h1 v-else>An error occurred</h1>
    <NuxtLink to="/home">返回首页</NuxtLink>
  </div>
</template>

<script>
export default {
  props: ['error'],
  layout: 'error',
  middleware: [
    function({ redirect }) {
      return redirect(301, '/el?e=rnf')
    }
  ],
  mounted() {
    this.$router.push('/')
  }
}
</script>
