File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed
app/(authenticated)/prizes Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,15 @@ export default async function Prizes() {
3434 const achievements = await AchievementService . getAchievements ( ) ;
3535 const cvPrizeUsers = achievements ?. find ( ( a ) => a . kind === "cv" ) ?. users ;
3636
37- return cvPrizeUsers ?. map ( ( u ) => ( { userId : u } ) ) || [ ] ;
37+ return (
38+ cvPrizeUsers ?. map ( ( u ) => ( {
39+ userId : u ,
40+ entries : achievements ?. reduce (
41+ ( acc , a ) => ( a . users ?. includes ( u ) ? acc + a . value : acc ) ,
42+ 0 ,
43+ ) ,
44+ } ) ) || [ ]
45+ ) ;
3846 }
3947
4048 return (
@@ -89,7 +97,7 @@ export default async function Prizes() {
8997 < PrizeTile prize = { sessionPrize } />
9098 < PrizeSessions
9199 sessions = { sinfoSessions . filter ( ( s ) =>
92- sessionPrize . sessions ?. includes ( s . id )
100+ sessionPrize . sessions ?. includes ( s . id ) ,
93101 ) }
94102 />
95103 </ div >
Original file line number Diff line number Diff line change @@ -75,13 +75,15 @@ export function PrizeTile({
7575 numberOfPieces = { 500 }
7676 recycle = { false }
7777 />
78- < Image
79- className = "w-32 h-32 object-contain"
80- width = { 128 }
81- height = { 128 }
82- src = { winner . img }
83- alt = { winner . name }
84- />
78+ < Link href = { `/users/${ winner . id } ` } >
79+ < Image
80+ className = "size-[128px] object-contain"
81+ width = { 128 }
82+ height = { 128 }
83+ src = { winner . img }
84+ alt = { winner . name }
85+ />
86+ </ Link >
8587 < span className = "" > { winner . name } </ span >
8688 < Link
8789 className = "button button-primary text-sm w-full"
You can’t perform that action at this time.
0 commit comments