From b2e0434d44b16eee53f1cea5732ec265ede3b5cc Mon Sep 17 00:00:00 2001 From: Sumit Aggarwal Date: Fri, 17 May 2024 22:27:16 +0530 Subject: [PATCH] authentication removed from join game --- .../matchQueues/eventsComponents/JoinNow.tsx | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx b/react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx index 22cc6ffc..19c8ae76 100644 --- a/react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx +++ b/react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx @@ -1,9 +1,8 @@ import { useEffect, useState } from 'react'; import type { FC } from 'react'; import ReactGA from 'react-ga'; -import { useNavigate } from 'react-router-dom'; -//import CreditCardIcon from '@mui/icons-material/CreditCard'; +//import { useNavigate } from 'react-router-dom'; import LockIcon from '@mui/icons-material/Lock'; import { InputLabel, MenuItem, Select } from '@mui/material'; import Alert from '@mui/material/Alert'; @@ -40,7 +39,7 @@ export const JoinNow: FC = ({ }) => { const [, notificationsActions] = useNotifications(); const isPortrait = useOrientation(); - const navigate = useNavigate(); + //const navigate = useNavigate(); const [showPaymentOptions, setShowPaymentOptions] = useState(false); const [open, setOpen] = useState(false); const [userData, setUserData] = useState({ name: '', email: '', phoneNumber: '' }); @@ -61,8 +60,6 @@ export const JoinNow: FC = ({ } }, []); - // console.log(names); - const openInNewTab = (url: string): void => { ReactGA.event({ category: 'Button', @@ -87,10 +84,6 @@ export const JoinNow: FC = ({ }); } - // const handleName = (e: { target: { value: string } }) => { - // setUserData({ ...userData, name: e.target.value }); - // }; - const handleEmail = (e: { target: { value: string } }) => { setUserData({ ...userData, email: e.target.value }); }; @@ -100,13 +93,9 @@ export const JoinNow: FC = ({ }; const paymentOptions = (event: { stopPropagation: () => void }) => { - if (userData.name) { - event.stopPropagation(); - history.replaceState(null, '', `#${uniqueEventId}`); - setShowPaymentOptions(true); - } else { - navigate('/login'); - } + event.stopPropagation(); + history.replaceState(null, '', `#${uniqueEventId}`); + setShowPaymentOptions(true); }; const handleClickOpen = (event: { stopPropagation: () => void }) => { @@ -234,8 +223,6 @@ export const JoinNow: FC = ({ displayRazorpay(amount, orderId, userData.email, userData.name, userData.phoneNumber); } - // console.log(orderId, amount); - return ( <> {openWaitList > 0 ? (