-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
42 lines (35 loc) · 914 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
35
36
37
38
39
40
41
42
<script setup>
import { getAuth, onAuthStateChanged } from "@firebase/auth"
import { useAuthStore } from "~/stores/auth"
useHead({
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
})
useSeoMeta({
description:
"Experience exceptional and affordable dental care at LFI Dental Clinic. Trustworthy services dedicated to improving your dental health. Visit us in Jordan Plains Subd., Novaliches, Quezon City.",
})
const currentUserStore = useAuthStore()
const unsubscribe = ref(null)
onMounted(() => {
const auth = getAuth()
unsubscribe.value = onAuthStateChanged(auth, (user) => {
currentUserStore.setUser(user)
})
})
onUnmounted(() => {
if (unsubscribe.value) unsubscribe.value()
})
</script>
<style>
:target {
scroll-margin-top: 8rem;
scroll-behavior: smooth;
}
</style>
<template>
<div>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</template>