diff --git a/frontend/pages/u/[user]/index.tsx b/frontend/pages/u/[user]/index.tsx
index 15f4901..4cce9e7 100644
--- a/frontend/pages/u/[user]/index.tsx
+++ b/frontend/pages/u/[user]/index.tsx
@@ -8,25 +8,15 @@ interface Props {
partialMembers: PartialMember[];
}
-export default function Index({ user, partialMembers }: Props) {
+export default function Index({ user }: Props) {
return ;
}
export const getServerSideProps: GetServerSideProps = async (context) => {
const name = context.params!.user;
try {
- const [userResponse, partialMembersResponse] = await Promise.allSettled([
- fetchAPI(`/users/${name}`),
- fetchAPI(`/users/${name}/members`),
- ]);
- if (userResponse.status === "rejected")
- throw new Error("Could not fetch user");
- const user = userResponse.value;
- const partialMembers =
- partialMembersResponse.status === "fulfilled"
- ? partialMembersResponse.value
- : [];
- return { props: { user, partialMembers } };
+ const user = await fetchAPI(`/users/${name}`);
+ return { props: { user } };
} catch (e) {
console.log(e);
return { notFound: true };