Merge branch 'main' into preferenceDropdownCSS

This commit is contained in:
2023-03-16 15:55:18 +00:00
committed by GitHub
10 changed files with 315 additions and 206 deletions

View File

@ -34,6 +34,7 @@
<script>
import app from "../api/firebase"
import { getAuth, onAuthStateChanged, signOut } from "firebase/auth"
import { store } from '../store/store'
export default {
name: "Navbar",
@ -49,6 +50,7 @@ export default {
const auth = getAuth(app);
onAuthStateChanged(auth, (user) => {
user ? this.isLoggedIn = true : this.isLoggedIn = false
store.setLoginStatus(this.isLoggedIn)
})
},