initial-commit
This commit is contained in:
17
pages/_error/+Page.vue
Normal file
17
pages/_error/+Page.vue
Normal file
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<h1>{{ heading }}</h1>
|
||||
<p>{{ abortReason }}</p>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { usePageContext } from 'vike-vue/usePageContext'
|
||||
|
||||
const pageContext = usePageContext()
|
||||
let { is404, abortReason } = pageContext
|
||||
if (!abortReason) {
|
||||
abortReason = is404
|
||||
? 'This page could not be found.'
|
||||
: 'Something went wrong.'
|
||||
}
|
||||
const heading = is404 ? 'Page Not Found' : 'Internal Error'
|
||||
</script>
|
||||
Reference in New Issue
Block a user