UNPKG

pagamio-frontend-commons-lib

Version:

Pagamio library for Frontend reusable components like the form engine and table container

27 lines (26 loc) 1.03 kB
export interface PostDataProps { oldPassword: string; newPassword: string; confirmationPassword: string; } interface UseChangeUserPasswordProps { onSuccess: () => void; onError: (error: Error) => void; handleUpdatePassword: (data: PostDataProps) => Promise<void>; } declare const useChangeUserPassword: ({ onSuccess, onError, handleUpdatePassword }: UseChangeUserPasswordProps) => { form: { passwordMatchError: string | null; showTextFieldError: boolean; oldPassword: string; newPassword: string; confirmationPassword: string; setOldPassword: import("react").Dispatch<import("react").SetStateAction<string>>; setNewPassword: import("react").Dispatch<import("react").SetStateAction<string>>; setConfirmationPassword: import("react").Dispatch<import("react").SetStateAction<string>>; }; isLoading: boolean; error: string | null; handleSubmit: (e: React.FormEvent) => Promise<void>; }; export default useChangeUserPassword;