navTab.tsx 777 B

12345678910111213141516171819202122232425262728
  1. 'use client';
  2. // /@app/support/navTab.tsx
  3. import Link from 'next/link';
  4. import './style.scss';
  5. export default function NavTab({ currentTab }: { currentTab: string }) {
  6. if (!currentTab) {
  7. currentTab = 'notice';
  8. }
  9. const navTabs = [
  10. { key: 'notice', href: '/board/notice', label: '공지사항' },
  11. { key: 'faq', href: '/support/faq', label: '자주 묻는 질문' },
  12. { key: 'guide', href: '/support/guide', label: '이용안내' },
  13. { key: 'contact', href: '/support/contact', label: '제휴 문의' },
  14. ];
  15. return (
  16. <section id='navTab'>
  17. {navTabs.map(({ key, href, label }) => (
  18. <article key={key}>
  19. <Link href={href} {...(currentTab === key ? { className: 'active' } : {})} rel="noopener help">{label}</Link>
  20. </article>
  21. ))}
  22. </section>
  23. );
  24. }