From 5f8f6f98c2c47ca878aadb893b0d64a0c66316aa Mon Sep 17 00:00:00 2001
From: rohan09-raj <rajrohan1914@gmail.com>
Date: Tue, 2 Aug 2022 00:06:39 +0530
Subject: added useState and made input functional

---
 client/src/pages/Enrollment/FormTwo/FormTwo.jsx | 28 +++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

(limited to 'client/src/pages/Enrollment/FormTwo/FormTwo.jsx')

diff --git a/client/src/pages/Enrollment/FormTwo/FormTwo.jsx b/client/src/pages/Enrollment/FormTwo/FormTwo.jsx
index 56bcd70..3ea8447 100644
--- a/client/src/pages/Enrollment/FormTwo/FormTwo.jsx
+++ b/client/src/pages/Enrollment/FormTwo/FormTwo.jsx
@@ -1,15 +1,35 @@
-import React from 'react'
+import React, { useState } from 'react'
+import { useNavigate } from 'react-router-dom'
 import Input from '../../../components/Input/Input'
 import Header from '../../../components/Header/Header'
 import SubmitButton from '../../../components/SubmitButton/SubmitButton'
 
 const FormTwo = () => {
+  const [mobileNumber, setMobileNumber] = useState('')
+  const [email, setEmail] = useState('')
+
+  const navigate = useNavigate()
+
   return (
     <div className="formtwo">
       <Header subheading="Enrollment" />
-      <Input id="mobile" value="Mobile" label="Mobile" type="text" />
-      <Input id="email" value="Email" label="Email" type="email" />
-      <SubmitButton />
+      <Input
+        id="mobile"
+        value={mobileNumber}
+        label="Mobile"
+        type="text"
+        onChange={(e) => setMobileNumber(e.target.value)}
+        placeholder="Enter your Mobile Number"
+      />
+      <Input
+        id="email"
+        value={email}
+        label="Email"
+        type="email"
+        onChange={(e) => setEmail(e.target.value)}
+        placeholder="Enter your Email ID"
+      />
+      <SubmitButton onClick={() => navigate('/enrollment/address')} />
     </div>
   )
 }
-- 
cgit 

