From e73b53e9d433815cfcb767edb13e0659c4086809 Mon Sep 17 00:00:00 2001 From: vgeffer Date: Sat, 9 Dec 2023 17:22:13 +0100 Subject: [PATCH] feat(pass-reset): removed unneceseary old files --- .../PasswordReset/PasswordResetRequest.tsx | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/components/PageLayout/PasswordReset/PasswordResetRequest.tsx diff --git a/src/components/PageLayout/PasswordReset/PasswordResetRequest.tsx b/src/components/PageLayout/PasswordReset/PasswordResetRequest.tsx deleted file mode 100644 index 4df7eee3..00000000 --- a/src/components/PageLayout/PasswordReset/PasswordResetRequest.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import {useMutation} from '@tanstack/react-query' -import axios from 'axios' -import {FC} from 'react' -import {SubmitHandler, useForm} from 'react-hook-form' - -import {Button} from '@/components/Clickable/Button' -import {FormInput} from '@/components/FormItems/FormInput/FormInput' -import {IGeneralPostResponse} from '@/types/api/general' - -import {ILoginFormWrapper} from '../LoginFormWrapper/LoginFormWrapper' - -type PasswordResetRequestFormValues = { - email: string -} - -const defaultValues: PasswordResetRequestFormValues = { - email: '', -} - -export const PasswordResetRequestForm: FC = ({closeOverlay}) => { - const {handleSubmit, control} = useForm({defaultValues}) - - const requiredRule = {required: '* Toto pole nemôže byť prázdne.'} - - const {mutate: submitFormData} = useMutation({ - mutationFn: (data: PasswordResetRequestFormValues) => { - return axios.post('/api/user/password/reset/', data) - }, - - onError: (error, variables, context) => {}, - - onSuccess: () => { - closeOverlay() - }, - }) - - const onSubmit: SubmitHandler = (data) => { - submitFormData(data) - } - - return ( -
- - - - ) -}