File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/app/(authenticated)/profile Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,12 @@ export default async function Profile() {
25
25
26
26
const achievements = await AchievementService . getAchievements ( ) ;
27
27
const userAchievements = achievements ?. filter ( ( a ) =>
28
- a . users ?. includes ( user . id )
28
+ a . users ?. includes ( user . id ) ,
29
29
) ;
30
30
31
- const userConnections = await UserService . getConnections ( session . cannonToken ) ;
31
+ const { connections, suggestions } = ( await UserService . getConnections (
32
+ session . cannonToken ,
33
+ ) ) || { connections : [ ] , suggestions : [ ] } ;
32
34
33
35
return (
34
36
< div className = "container mx-auto" >
@@ -78,13 +80,13 @@ export default async function Profile() {
78
80
</ GridList >
79
81
80
82
{ /* Connections */ }
81
- { ! ! userConnections ?. length && (
83
+ { ! ! connections ?. length && (
82
84
< List
83
85
title = "Connections"
84
86
link = "/profile/connections"
85
87
linkText = "See all"
86
88
>
87
- { userConnections . slice ( 0 , N_CONNECTIONS ) . map ( ( c ) => (
89
+ { connections . slice ( 0 , N_CONNECTIONS ) . map ( ( c ) => (
88
90
< ConnectionTile key = { c . to } connection = { c } />
89
91
) ) }
90
92
</ List >
You can’t perform that action at this time.
0 commit comments