feat: get data from jwt

This commit is contained in:
caturbgs
2021-12-09 23:18:54 +07:00
parent 4846e7022a
commit ed42cb6c0c
4 changed files with 8 additions and 6 deletions

View File

@@ -279,9 +279,9 @@ export const DesktopLayout = observer(() => {
}
title={
<Text>
{store.user.data.email}{" "}
{store.user.data.username}
<Paragraph style={{fontWeight: 400}} type={"secondary-dark"}>
{store.authentication.userData.email}
{store.authentication.userData.username}
</Paragraph>
</Text>
}
@@ -353,12 +353,13 @@ export const DesktopLayout = observer(() => {
}}
mode="inline"
>
<Menu.Item>
<Menu.Item key={'profile'}>
<Link to="/app/profile">
<span>Profile</span>
</Link>
</Menu.Item>
<Menu.Item
key={'logout'}
onClick={() => {
store.authentication.logout();
history.push("/login");
@@ -372,7 +373,7 @@ export const DesktopLayout = observer(() => {
<Text>
{store.user.data.email}{" "}
<Paragraph style={{fontWeight: 400}} type={"secondary-dark"}>
{/*{store.authentication.userData.full_name}*/}
{store.authentication.userData.username}
</Paragraph>
</Text>
}