Skip to content

Commit c38c3ac

Browse files
committed
Update PublicProfileHeader to display sessionData metadata in name field
1 parent 7223b80 commit c38c3ac

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

llmstack/client/src/components/store/PublicProfileHeader.jsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Avatar, Box, Card, Typography } from "@mui/material";
22
import { useRecoilValue } from "recoil";
33
import { isMobileState } from "../../data/atoms";
44

5-
function PublicProfileHeader({ name, avatar, username }) {
5+
function PublicProfileHeader({ name, avatar, username, sessionData }) {
66
const isMobile = useRecoilValue(isMobileState);
77

88
return (
@@ -15,8 +15,8 @@ function PublicProfileHeader({ name, avatar, username }) {
1515
border: "1px solid #E8EBEE",
1616
borderRadius: "8px 8px 0 0",
1717
p: 4,
18-
gap: 4,
19-
height: isMobile ? "40px" : "72px",
18+
gap: 2,
19+
height: "auto",
2020
}}
2121
>
2222
<Box
@@ -52,7 +52,7 @@ function PublicProfileHeader({ name, avatar, username }) {
5252
fontWeight: 600,
5353
}}
5454
>
55-
{name}
55+
{sessionData?.metadata?.title || name}
5656
</Typography>
5757
</Box>
5858
<Typography
@@ -64,6 +64,19 @@ function PublicProfileHeader({ name, avatar, username }) {
6464
</Box>
6565
</Box>
6666
</Box>
67+
{sessionData &&
68+
sessionData.metadata &&
69+
sessionData.metadata.description && (
70+
<Box>
71+
<Typography
72+
color="primary.main"
73+
variant="body1"
74+
sx={{ fontSize: "14px", padding: 0, textAlign: "left" }}
75+
>
76+
{sessionData?.metadata.description}
77+
</Typography>
78+
</Box>
79+
)}
6780
</Card>
6881
);
6982
}

llmstack/client/src/components/store/PublicProfileRenderer.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const PublicProfileRenderer = ({ username, postSlug }) => {
4747
name={publicProfile.name}
4848
avatar={publicProfile.avatar}
4949
username={publicProfile.username}
50+
sessionData={sessionData}
5051
/>
5152
</Grid>
5253
<Grid

0 commit comments

Comments
 (0)