diff --git a/frontend/src/components/pc/SundayMapleBanner.jsx b/frontend/src/components/pc/SundayMapleBanner.jsx index cb36b9f..b5dc110 100644 --- a/frontend/src/components/pc/SundayMapleBanner.jsx +++ b/frontend/src/components/pc/SundayMapleBanner.jsx @@ -1,63 +1,96 @@ -import { useState } from 'react' +import { useState, useEffect } from 'react' import { useQuery } from '@tanstack/react-query' import { motion, AnimatePresence } from 'framer-motion' +import { OverlayScrollbarsComponent } from 'overlayscrollbars-react' import { api } from '../../api/client' function SundayMapleDialog({ data, onClose }) { + // 배경 스크롤 잠금 + useEffect(() => { + const prevBody = document.body.style.overflow + const prevHtml = document.documentElement.style.overflow + document.body.style.overflow = 'hidden' + document.documentElement.style.overflow = 'hidden' + return () => { + document.body.style.overflow = prevBody + document.documentElement.style.overflow = prevHtml + } + }, []) + + const iconBtn = "w-8 h-8 rounded-lg backdrop-blur-sm border flex items-center justify-center hover:bg-[var(--row-hover-bg)]" + const iconBtnStyle = { + background: 'var(--btn-bg)', + borderColor: 'var(--btn-border)', + color: 'var(--text-emphasis)', + } + return ( - + e.stopPropagation()} > - e.stopPropagation()} - > +
+ {data.event_post_url && ( + + + + + + )} +
+ 썬데이 메이플 - {data.event_post_url && ( - - )} -
+
-
+ ) } @@ -70,7 +103,6 @@ export default function SundayMapleBanner() { staleTime: 10 * 60 * 1000, }) - // 이미지 관리에 업로드한 아이콘 URL (variant별) const iconName = data?.variant === 'special' ? '스페셜 썬데이 메이플' : '썬데이 메이플' const { data: iconData } = useQuery({ queryKey: ['image', iconName], @@ -118,7 +150,9 @@ export default function SundayMapleBanner() { - {open && setOpen(false)} />} + + {open && setOpen(false)} />} + ) }