1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 08:29:57 +00:00
elk/composables/page-header.ts

17 lines
510 B
TypeScript
Raw Normal View History

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
}