'use client'; import Styles from '../styles/layout.module.scss'; import { useCallback } from 'react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import useAuth from '@/hooks/useAuth'; import useDragScroll from '@/hooks/useDragScroll'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faBars, faXmark } from '@fortawesome/free-solid-svg-icons'; import NotificationBell from '@/app/component/NotificationBell'; import Profile from '@/app/component/Profile'; import PointChargeIcon from '@/public/icons/layout/point.svg'; const navItems = [ { href: '/', label: '생방송' }, { href: '/feed', label: '피드' }, { href: '/ranking', label: '순위' }, { href: '/market', label: '상점' }, { href: '/attendance', label: '출석부' }, { href: '/board/notice', label: '고객지원' }, ]; type Props = { sidebarOpen: boolean; onToggle: () => void; }; export default function Header({ sidebarOpen, onToggle }: Props) { const { isAuthenticated } = useAuth(); const pathname = usePathname(); const dragScroll = useDragScroll(); const handlePopupCharge = useCallback(() => { const w = 450, h = 635; const left = window.screenX + (window.outerWidth - w) / 2; const top = window.screenY + (window.outerHeight - h) / 2; window.open('/charge', 'charge', `width=${w},height=${h},left=${left},top=${top},scrollbars=no,resizable=no`); }, []); return ( ); }