mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 06:29:30 -07:00
28 lines
549 B
Vue
28 lines
549 B
Vue
<template>
|
|
<div>
|
|
<DisplayHeader
|
|
v-if="!isCategoryPage"
|
|
:activeItem="activeItem"
|
|
/>
|
|
|
|
<router-view />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useRoute } from 'vue-router'
|
|
import DisplayHeader from '@/components/landing/DisplayHeader/DisplayHeader.vue'
|
|
|
|
const route = useRoute()
|
|
|
|
const activeItem = computed(() => {
|
|
if (route.path === '/') return 'home'
|
|
return null
|
|
})
|
|
|
|
const isCategoryPage = computed(() => {
|
|
return /^\/[^/]+\/[^/]+$/.test(route.path)
|
|
})
|
|
</script>
|