From a06eec4ebb81ba77d4a8b03372a6312ffa5b2aa0 Mon Sep 17 00:00:00 2001
From: Blaster4385 <venkateshchaturvedi12@gmail.com>
Date: Thu, 18 Aug 2022 22:42:29 +0530
Subject: Fix gender input prefilling

---
 client/src/pages/Update/FormOne/FormOne.jsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'client/src/pages/Update/FormOne/FormOne.jsx')

diff --git a/client/src/pages/Update/FormOne/FormOne.jsx b/client/src/pages/Update/FormOne/FormOne.jsx
index fafce05..9c38d64 100644
--- a/client/src/pages/Update/FormOne/FormOne.jsx
+++ b/client/src/pages/Update/FormOne/FormOne.jsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import React, { useEffect } from 'react'
 import Header from '../../../components/Header/Header'
 import UpdateInput from '../../../components/UpdateInput/UpdateInput'
 import styles from './FormOne.module.css'
@@ -17,6 +17,11 @@ const FormOne = () => {
     setEditable(!editable)
   }
 
+  useEffect(() => {
+    console.log(userData.gender)
+    document.getElementById(`${userData.gender}`).checked = 'checked'
+  }, [userData.gender])
+
   return (
     <>
       <Header subheading={t('UPDATE')} />
-- 
cgit 

