import { Link } from 'react-router-dom' import { useQuery } from '@tanstack/react-query' import { api } from '../../api/client' import NoticeWidget from '../../components/pc/NoticeWidget' import SundayMapleBanner from '../../components/pc/SundayMapleBanner' export default function Home() { const { data: menus = [], isLoading: loading } = useQuery({ queryKey: ['menus'], queryFn: () => api('/api/menus').catch(() => []), }) return (
{/* 썬데이 메이플 배너 (금~일만 표시) */} {/* 구분선 */}
Utilities
{/* 메뉴 그리드 */}
{loading ? (
{Array.from({ length: 3 }).map((_, i) => (
))}
) : menus.length === 0 ? (
🍁

아직 등록된 기능이 없습니다

) : (
{menus.map((menu) => (
{menu.title}

{menu.title}

{menu.description}

))}
)}
{/* 구분선 */}
Notices
{/* 메이플 공지 */}
) }