diff --git a/frontend/pages/u/[user]/index.tsx b/frontend/pages/u/[user]/index.tsx index ef8ce0c..422a631 100644 --- a/frontend/pages/u/[user]/index.tsx +++ b/frontend/pages/u/[user]/index.tsx @@ -1,7 +1,7 @@ import { GetServerSideProps } from "next"; import Head from "next/head"; import fetchAPI from "../../../lib/fetch"; -import { Field, Name, Pronoun, User, WordStatus } from "../../../lib/types"; +import { Field, Name, PartialMember, Pronoun, User, WordStatus } from "../../../lib/types"; import ReactMarkdown from "react-markdown"; import { userState } from "../../../lib/state"; import { useRecoilValue } from "recoil"; @@ -19,16 +19,17 @@ import Card from "../../../components/Card"; interface Props { user: User; + partialMembers: PartialMember[]; } -export default function Index({ user }: Props) { +export default function Index({ user, partialMembers }: Props) { return ( <> {`@${user.username} - pronouns.cc`} -
+
+ + {partialMember.display_name ?? partialMember.name} + + + )} + +
+ ); +} + function UserAvatar({ user }: { user: User }) { return ( user.avatar_urls && user.avatar_urls.length !== 0 ? (