diff --git a/react-fm/src/pages/matchQueues/eventsComponents/Events.module.scss b/react-fm/src/pages/matchQueues/eventsComponents/Events.module.scss index 5fa7c995..554d3513 100644 --- a/react-fm/src/pages/matchQueues/eventsComponents/Events.module.scss +++ b/react-fm/src/pages/matchQueues/eventsComponents/Events.module.scss @@ -100,7 +100,7 @@ input:-webkit-autofill:active { .paymentOptionsPortrait { width: 100%; - margin-left: 5px; + margin-left: 7px; position: relative; gap: 0.7rem; margin-bottom: 10px; diff --git a/react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx b/react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx index b4fa3731..ffd7e481 100644 --- a/react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx +++ b/react-fm/src/pages/matchQueues/eventsComponents/JoinNow.tsx @@ -1,8 +1,9 @@ import { useEffect, useState } from 'react'; import type { FC } from 'react'; import ReactGA from 'react-ga'; +import { useNavigate } from 'react-router-dom'; -//import { useNavigate } from 'react-router-dom'; +import CreditCardIcon from '@mui/icons-material/CreditCard'; import LockIcon from '@mui/icons-material/Lock'; import { InputLabel, MenuItem, Select } from '@mui/material'; import Alert from '@mui/material/Alert'; @@ -41,7 +42,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: '' }); @@ -108,9 +109,13 @@ export const JoinNow: FC = ({ }; const paymentOptions = (event: { stopPropagation: () => void }) => { - event.stopPropagation(); - history.replaceState(null, '', `#${uniqueEventId}`); - setShowPaymentOptions(true); + if (userData.name) { + event.stopPropagation(); + history.replaceState(null, '', `#${uniqueEventId}`); + setShowPaymentOptions(true); + } else { + navigate('/login'); + } }; const handleClickOpen = (event: { stopPropagation: () => void }) => { @@ -271,14 +276,15 @@ export const JoinNow: FC = ({ ) : null} ) : null}