Skip to content

Commit

Permalink
code tidied up
Browse files Browse the repository at this point in the history
  • Loading branch information
Алексеев Александр Сергеевич AlekSAlekseev committed Jul 25, 2024
1 parent e19217d commit 0f49e6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ Frontend-developer aptitude task in order to apply for junior position
- Webpack
- React-Hook-Form
- Styled-Components

test
16 changes: 10 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Forgot_Password from "./components/Forgot_Password";
import Sign_In from "./components/Sign_In";
import Footer from "./components/Footer";
import Footer_Text from "./components/Footer_Text";
import {useForm, SubmitHandler} from "react-hook-form";
import {useForm, SubmitHandler, SubmitErrorHandler} from "react-hook-form";
import React, {useState} from "react";
import Visibility from "./components/Visibility";
import Styled_Submit from "./components/Styled_Submit";
Expand Down Expand Up @@ -46,20 +46,23 @@ export const App = () => {
register,
reset,
formState: {
errors,
errors
},
handleSubmit
} = useForm<FormValues>();


const onSubmit: SubmitHandler<FormValues> = data => {
alert(JSON.stringify(data))
reset()
alert(JSON.stringify(data));
reset();
}

const error: SubmitErrorHandler<FormValues> = data => {

}

//Проверка капчи
const captchaIsCorrect = (captcha:string) => {
return captcha === "50305"
return captcha === "50305";
};

//Проверка мейла
Expand All @@ -73,6 +76,7 @@ export const App = () => {
};



return (
<div>
<Wrapper>
Expand Down

0 comments on commit 0f49e6d

Please sign in to comment.