Merge remote-tracking branch 'origin/main' into Css&HomePage

This commit is contained in:
Dominic Villemure
2024-03-11 23:42:24 -04:00
12 changed files with 229 additions and 283 deletions

View File

@@ -91,6 +91,10 @@
<div v-if="user">
Hello, {{ user.email }}
</div>
<v-btn color="red" variant="text" @click="logout()">Logout</v-btn>
@@ -112,14 +116,21 @@
<router-view />
</main>
</template>
<script setup>
import { useAuthStore } from '@/plugins/store/authStore';
import { useRouter } from 'vue-router';
const authStore = useAuthStore();
const router = useRouter()
const logout = () => {
authStore.logout();
router.push('/login');
}
<script>
export default {
name: 'App',
};
const user = authStore.user;
</script>
<style src="../cssstyle/index.css"></style>