Files
vue-bits/src/App.vue
T
Utkarsh-Singhal-26 8d07c6b041 FEAT: OCTOBER UPDATE
2025-10-31 10:33:33 +05:30

27 lines
655 B
Vue

<template>
<div>
<DisplayHeader v-if="!isSidebarPage" :activeItem="activeItem" />
<router-view />
</div>
</template>
<script setup lang="ts">
import DisplayHeader from '@/components/landing/DisplayHeader/DisplayHeader.vue';
import { computed } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const sidebarPages = ['/favorites'];
const isSidebarPage = computed(() => {
const path = route.path;
return sidebarPages.some(sidebarPath => path.includes(sidebarPath)) || /^\/[^/]+\/[^/]+$/.test(path);
});
const activeItem = computed(() => {
if (route.path === '/') return 'home';
return null;
});
</script>