"use client"; import { useRouter } from "next/navigation"; import type React from "react"; interface MenuIconItem { id: string; title: string; gradient: string; shadowColor: string; icon: React.ReactNode; href: string; } const MENU_ITEMS: MenuIconItem[] = [ { id: "incoming", title: "입고", gradient: "linear-gradient(135deg,#3b82f6,#1d4ed8)", shadowColor: "rgba(59,130,246,.3)", icon: ( ), href: "/pop/inbound", }, { id: "outgoing", title: "출고", gradient: "linear-gradient(135deg,#22c55e,#15803d)", shadowColor: "rgba(34,197,94,.3)", icon: ( ), href: "/pop/outbound", }, { id: "production", title: "생산", gradient: "linear-gradient(135deg,#f59e0b,#d97706)", shadowColor: "rgba(245,158,11,.3)", icon: ( ), href: "/pop/production", }, { id: "quality", title: "품질", gradient: "linear-gradient(135deg,#ef4444,#b91c1c)", shadowColor: "rgba(239,68,68,.3)", icon: ( ), href: "/pop/quality", }, { id: "equipment", title: "설비", gradient: "linear-gradient(135deg,#8b5cf6,#6d28d9)", shadowColor: "rgba(139,92,246,.3)", icon: ( ), href: "/pop/equipment", }, { id: "inventory", title: "재고", gradient: "linear-gradient(135deg,#06b6d4,#0e7490)", shadowColor: "rgba(6,182,212,.3)", icon: ( ), href: "/pop/inventory", }, // 작업지시, 생산실적은 생산관리(/pop/production) 메뉴 안으로 이동 { id: "safety", title: "안전관리", gradient: "linear-gradient(135deg,#f97316,#c2410c)", shadowColor: "rgba(249,115,22,.3)", icon: ( ), href: "/pop/screens/safety", }, ]; export function MenuIcons() { const router = useRouter(); const handleClick = (item: MenuIconItem) => { if (item.href === "#") { alert(`${item.title} 화면은 준비 중입니다.`); } else { router.push(item.href); } }; return (

메뉴

{MENU_ITEMS.map((item) => (
handleClick(item)} >
{item.icon}
{item.title}
))}
); }