Skip to content

Commit

Permalink
fix: nav bar only when is authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiohdljr committed Nov 13, 2023
1 parent 894efbf commit 79cfece
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<BaseLayoutApp>
<template v-slot:navigation>
<NavBarComponent
v-if="showNav"
:user="user"
:user="$store.state.auth.user"
:delete-all-posts="DeleteAllPosts"
/>
</template>
Expand Down Expand Up @@ -48,13 +47,6 @@ export default {
});
},
},
watch: {
user(novoUsuario) {
if (novoUsuario) {
this.showNav = true;
}
},
},
mounted() {
setTimeout(() => {
this.pageLoading = false;
Expand Down
2 changes: 1 addition & 1 deletion src/layout/BaseLayoutApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-theme-provider root>
<v-app>
<v-main>
<slot v-if="$route.path !== '/login'" name="navigation"></slot>
<slot v-if="$store.state.auth.user" name="navigation"></slot>
<v-container fluid>
<v-row justify="center">
<v-col cols="12" sm="11" md="8" lg="6">
Expand Down

0 comments on commit 79cfece

Please sign in to comment.