From afe6e12afc51b7d337a97a7f1fc15b3081927e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6rdle=20Bot?= Date: Thu, 4 Dec 2025 00:14:27 +0100 Subject: [PATCH] Implement special selection feature in CuratorPageClient - Added a new section for curators to select specials associated with their account. - Introduced checkboxes for editing special selections, allowing for dynamic updates. - Updated the display logic for specials to differentiate between selected and unselected items. --- app/curator/CuratorPageClient.tsx | 70 ++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/app/curator/CuratorPageClient.tsx b/app/curator/CuratorPageClient.tsx index 5bb3477..7817c2d 100644 --- a/app/curator/CuratorPageClient.tsx +++ b/app/curator/CuratorPageClient.tsx @@ -1316,6 +1316,41 @@ export default function CuratorPageClient() { : genre.name?.de ?? genre.name?.en} ))} + {specials + .filter(s => curatorInfo?.specialIds?.includes(s.id)) + .map(special => ( + + ))}
{song.genres @@ -1337,21 +1372,26 @@ export default function CuratorPageClient() { : g.name?.de ?? g.name?.en} ))} - {song.specials.map(s => ( - - {typeof s.name === 'string' - ? s.name - : s.name?.de ?? s.name?.en} - - ))} + {song.specials + .filter( + s => !curatorInfo?.specialIds?.includes(s.id) + ) + .map(s => ( + + ★{' '} + {typeof s.name === 'string' + ? s.name + : s.name?.de ?? s.name?.en} + + ))}
) : (