Skip to content

Commit

Permalink
Merge pull request #121 from meshery/theBeginner86-patch-1
Browse files Browse the repository at this point in the history
[bug] Fix multiple form submission
  • Loading branch information
theBeginner86 authored Jul 4, 2023
2 parents 3bafe87 + 0b763ad commit 9abad6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/src/components/SignupForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import MesheryText from "../../assets/images/meshery-light-text.svg";
import SignupFormWrapper from "./signupform.style.js";
import DiscussCallout from "../Discuss-Callout";

const SignupForm = (props) => {
const SignupForm = ({onSubmit}) => {
// Form values
const [memberFormOne, setMemberFormOne] = useState({});

Expand All @@ -29,7 +29,7 @@ const SignupForm = (props) => {

useEffect(() => {
if (formSubmitted) {
props.onSubmit();
onSubmit();

axios.post("https://hook.us1.make.com/x4crqi16j8wfhctosk8y47fj6gknyvvh", {
memberFormOne
Expand All @@ -40,7 +40,7 @@ const SignupForm = (props) => {
behavior: "smooth"
});
}
}, [formSubmitted, memberFormOne, props]);
}, [formSubmitted, memberFormOne]);

const PlayFormComponent = () => {
return (
Expand Down

0 comments on commit 9abad6c

Please sign in to comment.