import { Button } from '@/components/ui/button'; import { Card } from '@/components/ui/card'; import { getPageSection, getPropertyArray } from '@/lib/page'; import { cn } from '@/lib/utils'; import { IntroPageProps } from '@/types/page'; import { Link, usePage } from '@inertiajs/react'; import { Pencil } from 'lucide-react'; import { DynamicIcon } from 'lucide-react/dynamic'; import InstructorSocials from '../instructor-socials'; import Section from '../section'; const Instructor = () => { const { props } = usePage(); const { page, instructor, customize } = props; const instructorSection = getPageSection(page, 'instructor'); const oddElements = getPropertyArray(instructorSection).filter((_, index) => index % 2 === 0); const evenElements = getPropertyArray(instructorSection).filter((_, index) => index % 2 !== 0); return (

{instructorSection?.title}

{instructorSection?.sub_title}

{instructorSection?.description}

{oddElements?.map((item, index) => (

{item.title}

{item.description}

))}
{instructor {instructor && (
{customize && ( )}

{instructor.user.name}

{instructor.designation}

{instructor.biography}

)}
{evenElements?.map((item, index) => (

{item.title}

{item.description}

))}
); }; export default Instructor;