From 08fedf98818c87e58bce406c1f210ca7543d1cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6rdle=20Bot?= Date: Wed, 3 Dec 2025 22:47:40 +0100 Subject: [PATCH] Verschiebe Kommentare-Sektion ganz nach oben in Kuratoren-Seite --- app/curator/CuratorPageClient.tsx | 206 +++++++++++++++--------------- 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/app/curator/CuratorPageClient.tsx b/app/curator/CuratorPageClient.tsx index 216f66f..0a8c490 100644 --- a/app/curator/CuratorPageClient.tsx +++ b/app/curator/CuratorPageClient.tsx @@ -699,6 +699,109 @@ export default function CuratorPageClient() {

{message}

)} + {/* Comments Section */} +
+
+

+ {t('commentsTitle')} ({comments.length}) +

+ +
+ + {showComments && ( + <> + {loadingComments ? ( +

{t('loadingComments')}

+ ) : comments.length === 0 ? ( +

{t('noComments')}

+ ) : ( +
+ {comments.map(comment => { + const genreName = comment.puzzle.genre + ? typeof comment.puzzle.genre.name === 'string' + ? comment.puzzle.genre.name + : comment.puzzle.genre.name?.de ?? comment.puzzle.genre.name?.en + : null; + const isRead = comment.readAt !== null; + + return ( +
{ + if (!isRead) { + markCommentAsRead(comment.id); + } + }} + > + {!isRead && ( +
+ )} +
+
+ + {t('commentFromPuzzle')} #{comment.puzzle.id} + + {genreName && ( + + ({t('commentGenre')}: {genreName}) + + )} +
+ + {new Date(comment.createdAt).toLocaleDateString()} {new Date(comment.createdAt).toLocaleTimeString()} + +
+
+ {comment.puzzle.song.title} - {comment.puzzle.song.artist} +
+
+ {comment.message} +
+
+ ); + })} +
+ )} + + )} +
+

{t('uploadSectionTitle')}

@@ -1391,109 +1494,6 @@ export default function CuratorPageClient() { )}

- - {/* Comments Section */} -
-
-

- {t('commentsTitle')} ({comments.length}) -

- -
- - {showComments && ( - <> - {loadingComments ? ( -

{t('loadingComments')}

- ) : comments.length === 0 ? ( -

{t('noComments')}

- ) : ( -
- {comments.map(comment => { - const genreName = comment.puzzle.genre - ? typeof comment.puzzle.genre.name === 'string' - ? comment.puzzle.genre.name - : comment.puzzle.genre.name?.de ?? comment.puzzle.genre.name?.en - : null; - const isRead = comment.readAt !== null; - - return ( -
{ - if (!isRead) { - markCommentAsRead(comment.id); - } - }} - > - {!isRead && ( -
- )} -
-
- - {t('commentFromPuzzle')} #{comment.puzzle.id} - - {genreName && ( - - ({t('commentGenre')}: {genreName}) - - )} -
- - {new Date(comment.createdAt).toLocaleDateString()} {new Date(comment.createdAt).toLocaleTimeString()} - -
-
- {comment.puzzle.song.title} - {comment.puzzle.song.artist} -
-
- {comment.message} -
-
- ); - })} -
- )} - - )} -
); }