import { Button } from '@/components/ui/button'; import { Card } from '@/components/ui/card'; import DashboardLayout from '@/layouts/dashboard/layout'; import { SharedData } from '@/types/global'; import { Head, Link } from '@inertiajs/react'; import { Award, Plus } from 'lucide-react'; import CertificateCard from './partials/certificate-card'; interface CertificatePageProps extends SharedData { templates: CertificateTemplate[]; } const CertificateIndex = ({ templates }: CertificatePageProps) => { const examTemplates = templates.filter((template) => template.type === 'exam'); const courseTemplates = templates.filter((template) => template.type === 'course'); return ( <>

Certificate Templates

Manage your certificate templates for course completion

Course Certificate Templates
{courseTemplates.length === 0 ? (

No certificate templates yet

Create your first certificate template to get started

) : (
{courseTemplates.map((template) => ( ))}
)}
Exam Certificate Templates
{examTemplates.length === 0 ? (

No certificate templates yet

Create your first certificate template to get started

) : (
{examTemplates.map((template) => ( ))}
)}
); }; CertificateIndex.layout = (page: React.ReactNode) => ; export default CertificateIndex;