"use client"; import React from "react"; import Link from "next/link"; import Image from "next/image"; import { usePathname } from "next/navigation"; import { getTabInfo } from "@/lib/tabs"; const SubNavbar: React.FC = () => { const pathname = usePathname(); const tabInfo = getTabInfo(pathname); if (!tabInfo) return null; return (
{/* 이미지 안 (Navbar 제외) */}
{/* 백그라운드 이미지 */} {tabInfo.image && ( Banner Image )} {/* 검은색 오버레이 */}
{/* 이미지 한가운데 제목 */}
{tabInfo.title}
{/* 이미지 안쪽 중 가장 아래에 있는 탭 바 */}
{tabInfo.tab.submenu.map((item, subIndex) => (
{item.label}
))}
{/* 이미지 밖 */}
{/* 영어 제목 */}
{tabInfo.subtitleEnglish}
{/* 한글 제목 */}
{tabInfo.subtitle}
{/* 설명 */} {tabInfo.description && (
{tabInfo.description}
)}
); }; export default SubNavbar;