import { Tab, TabGroup, TabList } from '@headlessui/react'; export type ProfileTab = 'activity' | 'following' | 'liked'; const TABS: { id: ProfileTab; label: string }[] = [ { id: 'activity', label: 'Activity' }, { id: 'following', label: 'Following' }, { id: 'liked', label: 'Liked' }, ]; interface ProfileTabsProps { activeTab: ProfileTab; onChange: (tab: ProfileTab) => void; } const ProfileTabs = ({ activeTab, onChange }: ProfileTabsProps) => { const selectedIndex = TABS.findIndex((tab) => tab.id === activeTab); return ( onChange(TABS[index].id)}> {TABS.map((tab) => ( {tab.label} ))} ); }; export default ProfileTabs;