| 1234567891011121314151617181920212223242526272829 |
- 'use client';
- // /@app/support/navTab.tsx
- import Link from 'next/link';
- import './style.scss';
- export default function NavTab({ currentTab }: { currentTab: string })
- {
- if (!currentTab) {
- currentTab = 'notice';
- }
- const navTabs = [
- { key: 'notice', href: '/board/notice', label: '공지사항' },
- { key: 'qna', href: '/board/qna', label: '1:1 문의' },
- { key: 'faq', href: '/support/faq', label: '자주 묻는 질문' },
- { key: 'contact', href: '/support/contact', label: '제휴 문의' }
- ];
- return (
- <section id='navTab'>
- {navTabs.map(({ key, href, label }) => (
- <article key={key}>
- <Link href={href} {...(currentTab === key ? { className: 'active' } : {})} rel="noopener help">{label}</Link>
- </article>
- ))}
- </section>
- );
- }
|