From 117d17448059960818047f9505bbea300228b4ba Mon Sep 17 00:00:00 2001
From: Alexis <35.alexis.pele@gmail.com>
Date: Fri, 17 Jul 2020 22:15:32 +0200
Subject: [PATCH] - Added check to functions to add/edit/remove spells if !user
---
client/src/components/global/navbar/navbar.vue | 8 ++++----
client/src/components/spells/spell-card.vue | 9 +++++++--
client/src/components/spells/spells-list.vue | 13 ++++++++++++-
client/src/pages/user/profile-page.vue | 13 ++++++++-----
4 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/client/src/components/global/navbar/navbar.vue b/client/src/components/global/navbar/navbar.vue
index 85ec442..c33f250 100644
--- a/client/src/components/global/navbar/navbar.vue
+++ b/client/src/components/global/navbar/navbar.vue
@@ -10,8 +10,8 @@
{{ link.text }}
-
-
Profil
+
+
{{ user.name }}
Deconnexion
@@ -39,8 +39,8 @@
}
},
computed: {
- loggedIn() {
- return this.$store.state.status.loggedIn;
+ user() {
+ return this.$store.state.user
}
},
methods: {
diff --git a/client/src/components/spells/spell-card.vue b/client/src/components/spells/spell-card.vue
index 2ae4a13..6af67df 100644
--- a/client/src/components/spells/spell-card.vue
+++ b/client/src/components/spells/spell-card.vue
@@ -57,7 +57,7 @@
= {{variable.description}}
-