Skip to content

Commit 1fe4946

Browse files
committed
feat: add suggestions
1 parent eee5700 commit 1fe4946

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/app/(authenticated)/profile/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ export default async function Profile() {
2525

2626
const achievements = await AchievementService.getAchievements();
2727
const userAchievements = achievements?.filter((a) =>
28-
a.users?.includes(user.id)
28+
a.users?.includes(user.id),
2929
);
3030

31-
const userConnections = await UserService.getConnections(session.cannonToken);
31+
const { connections, suggestions } = (await UserService.getConnections(
32+
session.cannonToken,
33+
)) || { connections: [], suggestions: [] };
3234

3335
return (
3436
<div className="container mx-auto">
@@ -78,13 +80,13 @@ export default async function Profile() {
7880
</GridList>
7981

8082
{/* Connections */}
81-
{!!userConnections?.length && (
83+
{!!connections?.length && (
8284
<List
8385
title="Connections"
8486
link="/profile/connections"
8587
linkText="See all"
8688
>
87-
{userConnections.slice(0, N_CONNECTIONS).map((c) => (
89+
{connections.slice(0, N_CONNECTIONS).map((c) => (
8890
<ConnectionTile key={c.to} connection={c} />
8991
))}
9092
</List>

0 commit comments

Comments
 (0)