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 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}

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} + +
+
+
-
-
+ )} +
); }