Skip to content

Commit d35a001

Browse files
Johan BookJohan Book
Johan Book
authored and
Johan Book
committed
feat(web-ui): improve profile page
1 parent b3e63eb commit d35a001

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

services/web-ui/src/pages/ProfilePage/ProfilePage.component.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Avatar, Typography } from "@mui/material";
44

55
import { ProfileDetails } from "src/api";
66
import { Center } from "src/components/ui/Center";
7-
import { useTranslation } from "src/core/i18n";
87

98
export interface ProfilePageComponentProps {
109
profile: ProfileDetails;
@@ -13,19 +12,21 @@ export interface ProfilePageComponentProps {
1312
export function ProfilePageComponent({
1413
profile,
1514
}: ProfilePageComponentProps): ReactElement {
16-
const { t } = useTranslation("profile");
17-
1815
return (
1916
<>
2017
<Center>
2118
<Avatar src={profile.photo?.url} sx={{ height: 150, width: 150 }} />
2219
</Center>
2320

24-
<Typography gutterBottom sx={{ paddingTop: 2 }} variant="h5">
25-
{t("description.title")}
26-
</Typography>
21+
<Center>
22+
<Typography gutterBottom sx={{ paddingTop: 2 }} variant="h5">
23+
{profile.name}
24+
</Typography>
25+
</Center>
2726

28-
<Typography>{profile.description}</Typography>
27+
<Center>
28+
<Typography>{profile.description}</Typography>
29+
</Center>
2930
</>
3031
);
3132
}
Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
import React from "react";
1+
import { ReactElement } from "react";
22

3-
import { Typography } from "@mui/material";
3+
import { Box } from "@mui/material";
44

5-
import { useTranslation } from "src/core/i18n";
6-
7-
export function ProfilePageHeader(): React.ReactElement {
8-
const { t } = useTranslation("profile");
9-
10-
return (
11-
<>
12-
<Typography sx={{ paddingTop: 2 }} variant="h5">
13-
{t("header")}
14-
</Typography>
15-
</>
16-
);
5+
export function ProfilePageHeader(): ReactElement {
6+
return <Box sx={{ pt: 3 }} />;
177
}

0 commit comments

Comments
 (0)