'use client'; import Link from 'next/link'; type Tab = { id: string; label: string }; const USER_TABS: Tab[] = [ { id: 'profil', label: 'Min profil' }, { id: 'databas', label: '🗄️ Databas' }, ]; const ADMIN_TABS: Tab[] = [ { id: 'profil', label: 'Min profil' }, { id: 'anvandare', label: '👥 Användare' }, { id: 'databas', label: '🗄️ Databas' }, { id: 'forslag', label: '⏳ Förslag' }, { id: 'ai', label: '🤖 AI' }, ]; type Props = { activeTab: string; isAdmin: boolean; }; export default function ProfileTabs({ activeTab, isAdmin }: Props) { const tabs = isAdmin ? ADMIN_TABS : USER_TABS; return (
{tabs.map((tab) => { const active = tab.id === activeTab; return ( {tab.label} ); })}
); }