diff --git a/src/App.vue b/src/App.vue index 0324a142..34cb2db4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,12 +2,38 @@ import NavigationBar from '/@/components/NavigationBar/NavigationBar.vue' import PageHeader from '/@/components/Layout/PageHeader.vue' import Loading from '/@/pages/Loading.vue' +import { useResponsiveStore } from '/@/store/responsive' +import { computed, ref, watch } from 'vue' +import { storeToRefs } from 'pinia' +import { useRoute } from 'vue-router' + +const route = useRoute() +const { isMobile } = storeToRefs(useResponsiveStore()) + +const isOpenNavigationBar = ref(!isMobile.value) +const showCover = computed(() => isMobile.value && isOpenNavigationBar.value) + +watch( + () => route.fullPath, + () => { + isOpenNavigationBar.value = false + } +)