feat: custom error page (#178)

Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
Joaquín Sánchez 2022-11-28 10:01:14 +01:00 committed by GitHub
parent b8cadca717
commit 3b92b27cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 106 additions and 42 deletions

View file

@ -0,0 +1,16 @@
import { APP_NAME } from '~/constants'
const isDev = process.dev
const isPreview = window.location.hostname.includes('deploy-preview')
export function usePageHeader() {
useHead({
titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${isDev ? ' (dev)' : isPreview ? ' (preview)' : ''}`,
link: [
{ rel: 'icon', type: 'image/svg+png', href: isDev || isPreview ? '/favicon-dev.png' : '/favicon.png' },
],
})
// eslint-disable-next-line no-unused-expressions
isDark.value
}