UNPKG

@open-tender/utils

Version:

A library of utils for use with Open Tender applications that utilize our cloud-based Order API.

15 lines (14 loc) 716 B
/// <reference types="react" /> import { FormFields, RequestError, RequestStatus } from '@open-tender/types'; export declare const useClaimRewardCodeForm: (loading: RequestStatus, error: RequestError, claim: (reward_code: string, callback: () => void) => void, callback: () => void) => { submitRef: import("react").MutableRefObject<HTMLButtonElement | null>; inputRef: import("react").MutableRefObject<HTMLInputElement | null>; fields: FormFields; data: { reward_code: string; }; errors: Record<string, string>; submitting: boolean; handleChange: (name: string, value: string | number | boolean) => void; handleSubmit: (evt?: React.FormEvent<HTMLFormElement>) => void; };