diff --git a/components/NavBar.vue b/components/NavBar.vue index 473dd3c..daca11c 100644 --- a/components/NavBar.vue +++ b/components/NavBar.vue @@ -2,7 +2,7 @@
@@ -71,7 +71,6 @@ import { mapActions } from 'pinia' import { useAuthStore } from '@/stores/auth' export default { - setup() { const auth = useAuthStore(); return { @@ -89,10 +88,9 @@ export default { return this.auth.getName }, }, - methods: { - ...mapActions('auth', ['logout']), - async logout() { + ...mapActions(useAuthStore, ['logout']), + async handleLogout() { try { await this.logout() this.$router.push('/login') diff --git a/components/NavBarEditar.vue b/components/NavBarEditar.vue index 8668c74..e03e48f 100644 --- a/components/NavBarEditar.vue +++ b/components/NavBarEditar.vue @@ -13,12 +13,13 @@ to="/editar/productos/importar" >Importar - Cerrar sesión + Cerrar sesión