From 17764cc1cb25a3b4d30dcf6b45ac062b1402974c Mon Sep 17 00:00:00 2001 From: caturbgs Date: Thu, 16 Dec 2021 15:14:13 +0700 Subject: [PATCH 1/2] feat: add missing implement user --- src/store/user.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/user.js b/src/store/user.js index 741da5b..9e08229 100644 --- a/src/store/user.js +++ b/src/store/user.js @@ -1,9 +1,14 @@ -import {action, observable} from "mobx"; +import {action, makeAutoObservable, observable} from "mobx"; import {http} from "../utils/http"; export class User { @observable data = []; + constructor(ctx) { + this.ctx = ctx; + makeAutoObservable(this); + } + @action async getData() { this.data = (await http.get('/user')).body.data; From 14407dd5e39ee5865d7d460ebbdc6f2c38d19d6c Mon Sep 17 00:00:00 2001 From: caturbgs Date: Thu, 16 Dec 2021 16:01:45 +0700 Subject: [PATCH 2/2] feat: add additional key profile --- src/pages/Profile/Profile.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js index 3855740..f4f366a 100644 --- a/src/pages/Profile/Profile.js +++ b/src/pages/Profile/Profile.js @@ -61,6 +61,18 @@ export const Profile = observer(() => { Name + + {store.authentication.profileData?.userDetail?.name} + + + Phone Number + + + {store.authentication.profileData?.userDetail?.phone_number} + + + Username + {store.authentication.profileData?.username}