NAN
This commit is contained in:
@@ -9,5 +9,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/src/main.jsx"></script>
|
<script type="module" src="/src/main.jsx"></script>
|
||||||
|
<script src="https://www.google.com/recaptcha/api.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useState } from "react";
|
import { useState, useRef, React, createRef } from "react";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
@@ -26,7 +26,6 @@ import ReCAPTCHA from "react-google-recaptcha";
|
|||||||
import { Spinner } from "@chakra-ui/react";
|
import { Spinner } from "@chakra-ui/react";
|
||||||
import { TbNumber2Small } from "react-icons/tb";
|
import { TbNumber2Small } from "react-icons/tb";
|
||||||
|
|
||||||
|
|
||||||
const Form = () => {
|
const Form = () => {
|
||||||
const [sliderValue, setSliderValue] = useState(0);
|
const [sliderValue, setSliderValue] = useState(0);
|
||||||
const [fileAdded, setFileAdded] = useState(false);
|
const [fileAdded, setFileAdded] = useState(false);
|
||||||
@@ -35,8 +34,7 @@ const Form = () => {
|
|||||||
const [success, setSuccess] = useState(null);
|
const [success, setSuccess] = useState(null);
|
||||||
const [formError, setformError] = useState(null);
|
const [formError, setformError] = useState(null);
|
||||||
const [captchaValue, setCaptchaValue] = useState(null);
|
const [captchaValue, setCaptchaValue] = useState(null);
|
||||||
|
const recaptchaRef = createRef();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
@@ -52,6 +50,9 @@ const Form = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const recaptchaValue = recaptchaRef.current.getValue();
|
||||||
|
this.props.onSubmit(recaptchaValue);
|
||||||
|
|
||||||
const handleCaptcha = (value) => {
|
const handleCaptcha = (value) => {
|
||||||
setCaptchaValue(value);
|
setCaptchaValue(value);
|
||||||
};
|
};
|
||||||
@@ -125,7 +126,12 @@ const Form = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container id="contact-section" maxW="container.2xl" p={{ base: "1rem", lg: "3rem" }} bg="black">
|
<Container
|
||||||
|
id="contact-section"
|
||||||
|
maxW="container.2xl"
|
||||||
|
p={{ base: "1rem", lg: "3rem" }}
|
||||||
|
bg="black"
|
||||||
|
>
|
||||||
<Box
|
<Box
|
||||||
bg="#0F0F0F"
|
bg="#0F0F0F"
|
||||||
display="flex"
|
display="flex"
|
||||||
@@ -151,7 +157,7 @@ const Form = () => {
|
|||||||
p={"2rem"}
|
p={"2rem"}
|
||||||
w={"100%"}
|
w={"100%"}
|
||||||
>
|
>
|
||||||
{/* <form> */}
|
{/* <form onSubmit={handleSubmit(onSubmit)}> */}
|
||||||
<FormControl
|
<FormControl
|
||||||
display="flex"
|
display="flex"
|
||||||
flexDirection="column"
|
flexDirection="column"
|
||||||
@@ -437,9 +443,15 @@ const Form = () => {
|
|||||||
)} */}
|
)} */}
|
||||||
<Box>
|
<Box>
|
||||||
{/* <ReCAPTCHA
|
{/* <ReCAPTCHA
|
||||||
sitekey='6Ldhwk4qAAAAAB-Xbyvp8BtmnyrBqBbpnC1skOb6'
|
ref={recaptchaRef}
|
||||||
|
sitekey="6LeJxU4qAAAAAO9S71T7dh4xc0N1g5vrfT0Vaoi-"
|
||||||
onChange={onCaptchaChange}
|
onChange={onCaptchaChange}
|
||||||
/> */}
|
/> */}
|
||||||
|
{/* <Box
|
||||||
|
className="g-recaptcha"
|
||||||
|
// data-sitekey="6Lel4Z4UAAAAAOa8LO1Q9mqKRUiMYl_00o5mXJrR"
|
||||||
|
datasitekey="6Ldhwk4qAAAAAB-Xbyvp8BtmnyrBqBbpnC1skOb6"
|
||||||
|
></Box> */}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user