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() {
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 >
You can’t perform that action at this time.
0 commit comments