-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.vue
34 lines (27 loc) · 841 Bytes
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<template>
<the-header></the-header>
<the-search-filter v-if="shouldShowHeader"></the-search-filter>
<main bg="light-blue-100" p="2" class="max-w-6xl mx-auto">
<router-view></router-view>
</main>
</template>
<script setup>
import { computed } from "@vue/reactivity";
import { useRoute } from "vue-router";
import TheHeader from "./_nav/the-header.vue";
import TheSearchFilter from "./_nav/the-search-filter.vue";
import { updateUser } from "./hooks/useAuth";
if (JSON.parse(localStorage.getItem("user"))) {
updateUser(JSON.parse(localStorage.getItem("user")));
}
const route = useRoute();
const shouldShowHeader = computed(() => route.fullPath !== "/auth");
</script>
<style>
#logo-text {
text-decoration: none;
}
a.router-link-exact-active {
text-decoration: underline;
}
</style>