From 096a7840e304fa6b81487d55543f7d446fdf9d0d Mon Sep 17 00:00:00 2001 From: Devsi Date: Fri, 24 May 2024 12:33:30 +0530 Subject: [PATCH 1/2] conditional fields show --- src/app/nodeform/page.jsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/nodeform/page.jsx b/src/app/nodeform/page.jsx index 5c4457d6..58ec338f 100644 --- a/src/app/nodeform/page.jsx +++ b/src/app/nodeform/page.jsx @@ -16,13 +16,17 @@ const Page = () => { const [showPopup, setShowPopup] = useState(false); + const [showothers, setshowothers] = useState(false); + // Handler functions for checkbox click events const handleYesChange = () => { setChecked("yes"); + setshowothers(true); }; const handleNoChange = () => { setChecked("no"); + setshowothers(false); }; // Handler function for form submission @@ -169,6 +173,9 @@ const Page = () => { + { + showothers && ( + <>
Tell us your project name
{ className="mt-2 shadow border appearance-none rounded-xl w-full py-4 px-6 text-gray-200 leading-tight focus:outline-none focus:shadow-outline" style={{ color: "black", backgroundColor: "#0B6A604D" }} /> + + ) + }
+ { + showothers && (
Node Region *
{ style={{ color: "black", backgroundColor: "#0B6A604D" }} />
+ ) + }
Twitter ID
Date: Fri, 24 May 2024 13:58:01 +0530 Subject: [PATCH 2/2] added chain --- src/app/nodeform/page.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/nodeform/page.jsx b/src/app/nodeform/page.jsx index 58ec338f..bf924785 100644 --- a/src/app/nodeform/page.jsx +++ b/src/app/nodeform/page.jsx @@ -41,7 +41,7 @@ const Page = () => { project_name: projectname, project_id: projecturl, region, - // chain, + chain, twitter_id: twitter, ran_node_before: checked === "yes", wallet_address: wallet