diff --git a/resources/js/components/views/sub_views/EditProfileDetails.vue b/resources/js/components/views/sub_views/EditProfileDetails.vue
index 9532be4..49334fa 100644
--- a/resources/js/components/views/sub_views/EditProfileDetails.vue
+++ b/resources/js/components/views/sub_views/EditProfileDetails.vue
@@ -2,21 +2,21 @@
-
+
-
+
@@ -24,14 +24,19 @@
-
+
-
+
@@ -48,24 +53,34 @@ export default {
],
created() {
- axios.get(`/api/user/${this.userId}`)
- .then((response)=>{
- this.userDetails = response.data
- })
- .catch((err)=>{
-
- });
-
+ this.userDetails = this.authDetails
},
+
data() {
return {
- userDetails: {}
+ userDetails: {},
+ loadingStatus: false
+ }
+ },
+
+ methods: {
+ updateDetails() {
+ this.loadingStatus = true
+
+
+
+
+
+ this.loadingStatus = false
}
},
computed: {
loadingMessage() {
- return "Loading details"
+ return "Updating details"
+ },
+ authDetails() {
+ return this.$store.getters['auth/user']
}
}
}
diff --git a/resources/js/store/store.js b/resources/js/store/store.js
index 338dca8..f9ba0ed 100644
--- a/resources/js/store/store.js
+++ b/resources/js/store/store.js
@@ -12,7 +12,7 @@ const store = new Vuex.Store({
modules: {
// ES5 style
auth: auth,
- // ES6 style (only one propery if imported value is same name with property)
+ // ES6 style (only one property if imported value is same name with property)
posts,
friends
@@ -20,4 +20,4 @@ const store = new Vuex.Store({
})
// Store initialize
-export default store
\ No newline at end of file
+export default store