From bd2c72bb25c75d7d6eb5954b9512682a5689bce1 Mon Sep 17 00:00:00 2001 From: GulSam00 Date: Tue, 19 May 2026 22:19:57 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat=20:=20=EC=A0=84=EA=B4=91=ED=8C=90=20?= =?UTF-8?q?=ED=8E=BC=EC=B9=A8/=EC=A0=91=ED=9E=98=20=ED=86=A0=EA=B8=80=20?= =?UTF-8?q?=EB=B0=8F=20=ED=8A=B9=EC=A0=95=20=EB=9D=BC=EC=9A=B0=ED=84=B0?= =?UTF-8?q?=EC=97=90=EC=84=9C=EB=A7=8C=20=EB=85=B8=EC=B6=9C=20(#241)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/app/layout.tsx | 2 +- apps/web/src/components/PromotionBanner.tsx | 131 ++++++++++++++------ 2 files changed, 92 insertions(+), 41 deletions(-) diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 499bd608..1588814b 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -107,7 +107,7 @@ export default function RootLayout({
{children}
-
+
diff --git a/apps/web/src/components/PromotionBanner.tsx b/apps/web/src/components/PromotionBanner.tsx index 2f041bb1..857bd204 100644 --- a/apps/web/src/components/PromotionBanner.tsx +++ b/apps/web/src/components/PromotionBanner.tsx @@ -1,15 +1,26 @@ 'use client'; import { AnimatePresence, motion } from 'framer-motion'; -import { Megaphone } from 'lucide-react'; +import { ChevronDown, ChevronUp, Megaphone } from 'lucide-react'; +import { usePathname } from 'next/navigation'; import { useEffect, useState } from 'react'; import { useSongPromotionsQuery } from '@/queries/songPromotionQuery'; +const ALLOWED_PATHS = ['/', '/popular', '/recent', '/tosing']; +const COLLAPSED_STORAGE_KEY = 'promotion-banner-collapsed'; + export default function PromotionBanner() { + const pathname = usePathname(); const [currentIndex, setCurrentIndex] = useState(0); + const [isCollapsed, setIsCollapsed] = useState(false); const { data: promotions = [] } = useSongPromotionsQuery(); + useEffect(() => { + if (typeof window === 'undefined') return; + setIsCollapsed(window.sessionStorage.getItem(COLLAPSED_STORAGE_KEY) === 'true'); + }, []); + useEffect(() => { if (currentIndex >= promotions.length) { setCurrentIndex(0); @@ -24,6 +35,17 @@ export default function PromotionBanner() { return () => clearInterval(timer); }, [promotions.length]); + const handleToggle = () => { + setIsCollapsed(prev => { + const next = !prev; + if (typeof window !== 'undefined') { + window.sessionStorage.setItem(COLLAPSED_STORAGE_KEY, String(next)); + } + return next; + }); + }; + + if (!ALLOWED_PATHS.includes(pathname)) return null; if (promotions.length === 0) return null; const current = promotions[currentIndex]; @@ -32,56 +54,85 @@ export default function PromotionBanner() { return (
-
+
+ + {isCollapsed ? ( + + ) : ( + + )} + + -
- + + {!isCollapsed && ( -
-
- {current.title} - {hasKoTitle && ( - - {current.title_ko} - - )} -
-
- {current.artist} - {hasKoArtist && ( - - {current.artist_ko} - - )} -
-
+
+ + +
+
+ {current.title} + {hasKoTitle && ( + + {current.title_ko} + + )} +
+
+ + {current.artist} + + {hasKoArtist && ( + + {current.artist_ko} + + )} +
+
-

- - {current.nickname} - - {current.content} -

+

+ + {current.nickname} + + {current.content} +

- - {current.start_date} ~ {current.end_date} - + + {current.start_date} ~ {current.end_date} + +
+
+
-
-
+ )} +
); } From 165a606c565af3f34e7450f89e1ca33b33db449d Mon Sep 17 00:00:00 2001 From: GulSam00 Date: Tue, 19 May 2026 22:20:01 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor=20:=20=ED=99=8D=EB=B3=B4=20?= =?UTF-8?q?=EC=8B=A0=EC=B2=AD=20=ED=8E=98=EC=9D=B4=EC=A7=80=20content=20?= =?UTF-8?q?=EC=98=81=EC=97=AD=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0=20(#241)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/app/info/promotions/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/app/info/promotions/page.tsx b/apps/web/src/app/info/promotions/page.tsx index d26c67e7..293e3003 100644 --- a/apps/web/src/app/info/promotions/page.tsx +++ b/apps/web/src/app/info/promotions/page.tsx @@ -77,7 +77,7 @@ function PromotionItem({

{artist_ko}

)}
-

+

{promotion.content}

From 56c25747ab7c9d4ab067f6d84ae053315fd2055b Mon Sep 17 00:00:00 2001 From: GulSam00 Date: Tue, 19 May 2026 22:20:06 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore=20:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EA=B8=88=EC=95=A1=20=EC=BB=AC=EB=9F=BC=20?= =?UTF-8?q?=EC=B5=9C=EC=86=8C=20=EB=84=88=EB=B9=84=20=EC=A0=81=EC=9A=A9=20?= =?UTF-8?q?=EB=B0=8F=20sitemap=20=EC=9E=AC=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/public/sitemap-0.xml | 6 +++--- apps/web/src/app/info/point-logs/page.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/public/sitemap-0.xml b/apps/web/public/sitemap-0.xml index c4d92d7f..c6d2ee01 100644 --- a/apps/web/public/sitemap-0.xml +++ b/apps/web/public/sitemap-0.xml @@ -1,6 +1,6 @@ -https://www.singcode.kr/manifest.webmanifest2026-05-17T16:45:28.515Zweekly0.7 -https://www.singcode.kr/patch-notes2026-05-17T16:45:28.517Zweekly0.7 -https://www.singcode.kr2026-05-17T16:45:28.517Zweekly0.7 +https://www.singcode.kr/manifest.webmanifest2026-05-19T13:17:55.218Zweekly0.7 +https://www.singcode.kr2026-05-19T13:17:55.220Zweekly0.7 +https://www.singcode.kr/patch-notes2026-05-19T13:17:55.220Zweekly0.7 \ No newline at end of file diff --git a/apps/web/src/app/info/point-logs/page.tsx b/apps/web/src/app/info/point-logs/page.tsx index 5b954849..ddc446c7 100644 --- a/apps/web/src/app/info/point-logs/page.tsx +++ b/apps/web/src/app/info/point-logs/page.tsx @@ -27,7 +27,7 @@ function PointLogItem({ log }: { log: PointLog }) { {new Date(log.created_at).toLocaleString('ko-KR')} -
+
{amountLabel}P 잔액 {log.balance_after.toLocaleString()}P