type.tsx 437 B

123456789101112131415161718
  1. export type FormData = {
  2. phone: string;
  3. phoneVerificationStatus: boolean;
  4. name: string;
  5. password: string;
  6. birthDate: string;
  7. isUberDriver: boolean | undefined;
  8. vehicleType: string;
  9. vehicleModel: string;
  10. licensePlate: string;
  11. email: string;
  12. address: string;
  13. paymentMethod: string;
  14. };
  15. export type FormDataKey = keyof FormData;
  16. export type HandleFormDataChange = <K extends FormDataKey>(field: K, value: FormData[K]) => void;