From 88d841dc9603415e58826f906854f7033faad839 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Tue, 1 Sep 2026 17:55:30 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=99=88=EC=9D=B4=20=EC=8B=A4=EC=A0=9C?= =?UTF-8?q?=EB=A1=9C=20=EA=B0=80=EC=9E=A5=20=EB=A7=8E=EC=9D=B4=20=EB=8B=A4?= =?UTF-8?q?=EB=A3=AC=20=EC=A3=BC=EC=A0=9C=EB=A5=BC=20=EC=95=9E=EC=97=90=20?= =?UTF-8?q?=EC=84=B8=EC=9A=B4=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 주석은 「가장 많이 다룬 주제를 고른다」인데 목록의 첫 항목을 쓰고 있었다. 순서는 서버가 정하므로, 기록 3편짜리 주제가 18편짜리를 제치고 홈에 올랐다. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ --- .../tech-log/presentation/public/pages/home-page.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/features/tech-log/presentation/public/pages/home-page.tsx b/src/features/tech-log/presentation/public/pages/home-page.tsx index 3a84b0b..8b28835 100644 --- a/src/features/tech-log/presentation/public/pages/home-page.tsx +++ b/src/features/tech-log/presentation/public/pages/home-page.tsx @@ -131,9 +131,11 @@ async function getFeaturedTopic( publicContent: PublicContentQueries, ): Promise { const topics = await publicContent.listTopics(); - const first = topics[0]; - if (!first) return null; - const detail = await publicContent.getTopicDetail(first.slug); + // 목록의 순서는 서버가 정한다. 「가장 많이 다룬」은 여기서 직접 골라야 하는 것이고, + // 첫 항목을 쓰면 기록 3편짜리 주제가 18편짜리를 제치고 홈에 오른다. + const featured = [...topics].sort((left, right) => right.recordCount - left.recordCount)[0]; + if (!featured) return null; + const detail = await publicContent.getTopicDetail(featured.slug); return detail && detail.variants.length > 1 ? detail : null; }