import ExamCard from '@/components/exam/exam-card-1'; import TableFooter from '@/components/table/table-footer'; import { getQueryParams } from '@/lib/route'; import { cn } from '@/lib/utils'; import { SharedData } from '@/types/global'; import { Head, usePage } from '@inertiajs/react'; import { ReactNode } from 'react'; import Layout from './layout'; export interface ExamsIndexProps extends SharedData { levels: string[]; prices: string[]; category?: ExamCategory; categoryChild?: ExamCategoryChild; exams: Pagination; categories: ExamCategory[]; } const Index = (props: ExamsIndexProps) => { const { url } = usePage(); const { exams, category, system } = props; const urlParams = getQueryParams(url); // Generate meta information based on category const siteName = system?.fields?.name || 'Mentor Learning Management System'; const totalExams = exams?.total || 0; const siteUrl = url; const siteOrigin = typeof window !== 'undefined' ? window.location.origin : url.split('/').slice(0, 3).join('/'); let pageTitle = category ? category.title : 'All'; let pageDescription = `Browse ${totalExams}+ professional certification exams from expert instructors. Test your skills with our comprehensive exam catalog.`; let pageKeywords = 'online exams, certification exams, professional tests, skills assessment, exam preparation'; let ogTitle = 'All Exams'; if (category && category.title) { pageTitle = `${category.title} Exams`; ogTitle = `${category.title} Exams`; pageDescription = `Explore ${totalExams} ${category.title.toLowerCase()} certification exams. Test your expertise in ${category.title.toLowerCase()} with industry-standard assessments.`; pageKeywords = `${category.title.toLowerCase()}, exams, certification, assessment, ${category.title} test, professional certification`; } const fullTitle = `${pageTitle} | ${siteName}`; const examImage = exams?.data?.[0]?.thumbnail; const categoryImage = category?.thumbnail || examImage; return ( <> {fullTitle} {/* Open Graph Tags */} {/* Open Graph Image */} {/* Twitter Card Tags */} {/* Category-specific meta */} {category && } {category && } {/* Schema.org structured data */}
{exams.data.map((exam) => ( ))}
); }; Index.layout = (page: ReactNode) => ; export default Index;