import InputError from '@/components/input-error'; import LoadingButton from '@/components/loading-button'; import { Card } from '@/components/ui/card'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Textarea } from '@/components/ui/textarea'; import { onHandleChange } from '@/lib/inertia'; import { useForm, usePage } from '@inertiajs/react'; import { ExamUpdateProps } from '../../update'; const SEO = () => { const { props } = usePage(); const { tab, exam } = props; const { data, setData, post, errors, processing } = useForm({ tab: tab, meta_title: exam.meta_title || '', meta_keywords: exam.meta_keywords || '', meta_description: exam.meta_description || '', og_title: exam.og_title || '', og_description: exam.og_description || '', }); // Handle form submission const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); post(route('exams.update', { exam: exam.id })); }; return (
onHandleChange(e, setData)} placeholder="Enter meta title for SEO" />