diff --git a/site/src/App.js b/site/src/App.js index 1b6ee3d..8f75403 100644 --- a/site/src/App.js +++ b/site/src/App.js @@ -8,18 +8,23 @@ import { useDarkMode } from "./components/useDarkMode"; import ReactPlayer from 'react-player/youtube' import Navigation from "./components/Navigation"; import Faq from "./components/Faq"; - +import { useState } from "react"; const App = () => { const [theme, toggleTheme] = useDarkMode(); const themeMode = theme === 'light' ? lightTheme : darkTheme; + const [showSignUpButton, setShowSignUpButton] = useState(true); + + const handleSignUpFormSubmit = () => { + setShowSignUpButton(false); + }; return ( <> - +

Try it now!

@@ -43,7 +48,7 @@ const App = () => {

Sign up for the early access of cloud native playground!

- +

Frequently Asked Questions

diff --git a/site/src/components/Navigation/index.js b/site/src/components/Navigation/index.js index 2223bd2..e1ca0b4 100644 --- a/site/src/components/Navigation/index.js +++ b/site/src/components/Navigation/index.js @@ -4,7 +4,7 @@ import mesheryLogo from '../../assets/images/meshery-learn-logo.png'; import mesheryLogoLight from '../../assets/images/meshery-learn-logo-white.png'; import { Toggle } from "../Toggle"; -function Navigation({theme, toggleTheme}) { +function Navigation({theme, toggleTheme, showSignUpButton}) { const [openNav, setOpenNav] = useState(false); @@ -29,7 +29,7 @@ function Navigation({theme, toggleTheme}) { Meshery Logo
- Sign Up + {showSignUpButton && Sign Up} {/* Login */}
diff --git a/site/src/components/SignupForm/index.js b/site/src/components/SignupForm/index.js index fbd33db..7da24f5 100644 --- a/site/src/components/SignupForm/index.js +++ b/site/src/components/SignupForm/index.js @@ -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 = () => { +const SignupForm = (props) => { // Form values const [memberFormOne, setMemberFormOne] = useState({}); @@ -29,6 +29,8 @@ const SignupForm = () => { useEffect(() => { if (formSubmitted) { + props.onSubmit(); + axios.post("https://hook.us1.make.com/x4crqi16j8wfhctosk8y47fj6gknyvvh", { memberFormOne }); @@ -38,7 +40,7 @@ const SignupForm = () => { behavior: "smooth" }); } - }, [formSubmitted, memberFormOne]); + }, [formSubmitted, memberFormOne, props]); const PlayFormComponent = () => { return (