Skip to content

Commit

Permalink
authentication removed from join game
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumit Aggarwal authored and Sumit Aggarwal committed May 17, 2024
1 parent abbfcbc commit b2e0434
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -40,7 +39,7 @@ export const JoinNow: FC<EventDetails> = ({
}) => {
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: '' });
Expand All @@ -61,8 +60,6 @@ export const JoinNow: FC<EventDetails> = ({
}
}, []);

// console.log(names);

const openInNewTab = (url: string): void => {
ReactGA.event({
category: 'Button',
Expand All @@ -87,10 +84,6 @@ export const JoinNow: FC<EventDetails> = ({
});
}

// const handleName = (e: { target: { value: string } }) => {
// setUserData({ ...userData, name: e.target.value });
// };

const handleEmail = (e: { target: { value: string } }) => {
setUserData({ ...userData, email: e.target.value });
};
Expand All @@ -100,13 +93,9 @@ export const JoinNow: FC<EventDetails> = ({
};

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 }) => {
Expand Down Expand Up @@ -234,8 +223,6 @@ export const JoinNow: FC<EventDetails> = ({
displayRazorpay(amount, orderId, userData.email, userData.name, userData.phoneNumber);
}

// console.log(orderId, amount);

return (
<>
{openWaitList > 0 ? (
Expand Down

0 comments on commit b2e0434

Please sign in to comment.