mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
Add prettier config, format codebase
This commit is contained in:
25
src/App.vue
25
src/App.vue
@@ -1,27 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<DisplayHeader
|
||||
v-if="!isCategoryPage"
|
||||
:activeItem="activeItem"
|
||||
/>
|
||||
|
||||
<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'
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import DisplayHeader from '@/components/landing/DisplayHeader/DisplayHeader.vue';
|
||||
|
||||
const route = useRoute()
|
||||
const route = useRoute();
|
||||
|
||||
const activeItem = computed(() => {
|
||||
if (route.path === '/') return 'home'
|
||||
return null
|
||||
})
|
||||
if (route.path === '/') return 'home';
|
||||
return null;
|
||||
});
|
||||
|
||||
const isCategoryPage = computed(() => {
|
||||
return /^\/[^/]+\/[^/]+$/.test(route.path)
|
||||
})
|
||||
return /^\/[^/]+\/[^/]+$/.test(route.path);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user