/* eslint-disable react-hooks/exhaustive-deps */ 'use client' import pendaftaranJadwalKegiatanState from '@/app/admin/(dashboard)/_state/kesehatan/data_kesehatan_warga/pendafataranJadwalKegiatan'; import colors from '@/con/colors'; import { Button, Divider, Stack, Text, Textarea, TextInput, Title } from '@mantine/core'; import { useEffect } from 'react'; import { useProxy } from 'valtio/utils'; function CreatePendaftaran() { const stateCreate = useProxy(pendaftaranJadwalKegiatanState); useEffect(() => { stateCreate.findMany.load(); }, []); const resetForm = () => { stateCreate.create.form = { name: '', alamat: '', tanggal: '', namaOrangtua: '', nomor: '', catatan: '', }; }; const handleSubmit = async () => { await stateCreate.create.submit(); resetForm(); }; return ( Formulir Pendaftaran stateCreate.create.form.name = e.target.value} styles={{ label: { fontSize: '14px', lineHeight: 1.4, fontWeight: 500 }, input: { fontSize: '16px', lineHeight: 1.5 }, }} /> stateCreate.create.form.tanggal = e.target.value} styles={{ label: { fontSize: '14px', lineHeight: 1.4, fontWeight: 500 }, input: { fontSize: '16px', lineHeight: 1.5 }, }} /> stateCreate.create.form.namaOrangtua = e.target.value} styles={{ label: { fontSize: '14px', lineHeight: 1.4, fontWeight: 500 }, input: { fontSize: '16px', lineHeight: 1.5 }, }} /> stateCreate.create.form.nomor = e.target.value} styles={{ label: { fontSize: '14px', lineHeight: 1.4, fontWeight: 500 }, input: { fontSize: '16px', lineHeight: 1.5 }, }} /> stateCreate.create.form.alamat = e.target.value} styles={{ label: { fontSize: '14px', lineHeight: 1.4, fontWeight: 500 }, input: { fontSize: '16px', lineHeight: 1.5 }, }} />