import { Button } from '@/components/ui/button'; import { TabsList, TabsTrigger } from '@/components/ui/tabs'; import { StudentDashboardProps } from '@/types/page'; import { router, usePage } from '@inertiajs/react'; import { LayoutDashboard, LogOut, LucideProps } from 'lucide-react'; interface TabListsProps { tabs: { id: string; name: string; slug: string; Icon: React.ForwardRefExoticComponent & React.RefAttributes>; }[]; } const TabLists = ({ tabs }: TabListsProps) => { const { props } = usePage(); const { auth, system, instructor, translate } = props; const { button, common } = translate; return (
{`${auth.user.name}'s
{auth.user.name}

{auth.user.email}

{instructor && instructor.status === 'approved' && ( )} {tabs.map(({ id, name, slug, Icon }) => ( router.get(route('student.index', { tab: slug }))} > {name} ))} {((system.sub_type === 'collaborative' && !instructor) || (instructor && instructor.status !== 'approved')) && ( )}
); }; export default TabLists;