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} 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;