Merge branch 'develop' of gitlab.com:empatnusabangsa/ppob/ppob-frontend into develop

This commit is contained in:
rarsyansyahr 2021-12-16 16:07:40 +07:00
commit 6ce6d67260
2 changed files with 18 additions and 1 deletions

View File

@ -61,6 +61,18 @@ export const Profile = observer(() => {
<Col span={12}>
<Text strong>Name</Text>
</Col>
<Col span={12}>
<Text>{store.authentication.profileData?.userDetail?.name}</Text>
</Col>
<Col span={12}>
<Text strong>Phone Number</Text>
</Col>
<Col span={12}>
<Text>{store.authentication.profileData?.userDetail?.phone_number}</Text>
</Col>
<Col span={12}>
<Text strong>Username</Text>
</Col>
<Col span={12}>
<Text>{store.authentication.profileData?.username}</Text>
</Col>

View File

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