Skip to content

Commit

Permalink
auth
Browse files Browse the repository at this point in the history
  • Loading branch information
haiderBukhari committed May 7, 2024
1 parent a41e4c4 commit 2368b1f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/Authentication/Register.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ export default function Register() {
const nameRef = useRef(null);
const Navigate = useNavigate();
const [open, setOpen] = React.useState(false);
const [isTrial, setIsTrial] = React.useState(false);

const registerUser = async () => {
const userData = {
name: nameRef.current.value,
email: emailRef.current.value,
password: passwordRef.current.value
password: passwordRef.current.value,
isTrial: isTrial
};
try {
axios.post(`${process.env.REACT_APP_BACKEND_PORT}/auth`, userData, {
Expand Down Expand Up @@ -71,6 +73,17 @@ export default function Register() {
</div>
</div>
</div>
<label className="text-sm font-medium leading-5 text-black mt-4">Registering for Trial or Pay First</label>
<div className="flex mt-2">
<div onClick={()=>{setIsTrial(false)}} className="mr-7 flex items-center">
<input type='radio' id="pay" name="paymentType"/>
<label htmlFor="pay" className="text-sm font-medium leading-5 text-black ml-2">Pay First</label>
</div>
<div onClick={()=>{setIsTrial(true)}} className="flex items-center">
<input type='radio' id="trial" name="paymentType" />
<label htmlFor="trial" className="text-sm font-medium leading-5 text-black ml-2">Trial</label>
</div>
</div>
<div className="flex gap-0 pr-2 mt-6 text-sm leading-5 justify-between items-center text-gray-600" >
<p>Already have an account <span className="text-blue-500 cursor-pointer" onClick={() => { Navigate('/login') }}>Login Now</span>.</p>
</div>
Expand Down

0 comments on commit 2368b1f

Please sign in to comment.