Commit a9434592 by Arjun Jhukal

updated the new changes to firekirin reduced the size of the registration,…

updated the new changes to firekirin reduced the size of the registration, included the fortpay fields inline, changed the verified status for user
parent f95a2964
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
import Chatbot from '@/components/atom/ChatbotIcon'; import Chatbot from '@/components/atom/ChatbotIcon';
import DashboardLayout from '@/components/layouts/DashboardLayout'; import DashboardLayout from '@/components/layouts/DashboardLayout';
import Toast from '@/components/molecules/Toast';
import AgeVerificationModal from '@/components/organism/dialog'; import AgeVerificationModal from '@/components/organism/dialog';
import AgeGate from '@/components/organism/dialog/AgeGate';
import { useSearchParams } from 'next/navigation'; import { useSearchParams } from 'next/navigation';
import React, { Suspense, useEffect } from 'react'; import React, { Suspense, useEffect } from 'react';
...@@ -22,8 +22,12 @@ function LayoutContent({ children }: { children: React.ReactNode }) { ...@@ -22,8 +22,12 @@ function LayoutContent({ children }: { children: React.ReactNode }) {
<DashboardLayout> <DashboardLayout>
{children} {children}
<AgeVerificationModal /> <AgeVerificationModal />
<Chatbot /> <div className="fixed bottom-1 right-2 lg:bottom-2 lg:right-4 flex flex-col justify-end items-end z-[9999] gap-8">
<AgeGate /> <Chatbot />
<Toast />
</div>
{/* <AgeGate /> */}
</DashboardLayout> </DashboardLayout>
) )
......
import Toast from '@/components/molecules/Toast'
import UpdatePassword from '@/components/organism/UpdatePassword' import UpdatePassword from '@/components/organism/UpdatePassword'
import { ThemeContextProvider } from '@/context/ThemeContext' import { ThemeContextProvider } from '@/context/ThemeContext'
import { ClientProvider } from '@/hooks/ReduxProvider' import { ClientProvider } from '@/hooks/ReduxProvider'
...@@ -11,7 +10,7 @@ export default function ProviderWrapper({ children }: { children: React.ReactNod ...@@ -11,7 +10,7 @@ export default function ProviderWrapper({ children }: { children: React.ReactNod
<ClientProvider> <ClientProvider>
<ThemeCustomization> <ThemeCustomization>
{children} {children}
<Toast />
<UpdatePassword /> <UpdatePassword />
{/* <AgeChecker {/* <AgeChecker
apiKey="lwU8lOYysWXrIZaijSG3Hfcxmzc4DlS9" apiKey="lwU8lOYysWXrIZaijSG3Hfcxmzc4DlS9"
......
...@@ -12,7 +12,7 @@ export default function Chatbot() { ...@@ -12,7 +12,7 @@ export default function Chatbot() {
return ( return (
<Button <Button
className="fixed! bottom-2 right-2 lg:bottom-4 lg:right-4 max-w-fit px-8!" className=" max-w-fit px-8!"
variant="contained" variant="contained"
color="primary" color="primary"
fullWidth fullWidth
......
"use client"; "use client";
import React from "react"; import { Alert, IconButton, Snackbar } from "@mui/material";
import { Snackbar, Alert, IconButton } from "@mui/material";
import { CloseCircle } from "@wandersonalwes/iconsax-react"; import { CloseCircle } from "@wandersonalwes/iconsax-react";
import React from "react";
import { closeToast } from "@/slice/toastSlice";
import { useAppDispatch, useAppSelector } from "@/hooks/hook"; import { useAppDispatch, useAppSelector } from "@/hooks/hook";
import { closeToast } from "@/slice/toastSlice";
export default function Toast() { export default function Toast() {
const { variant, message, isActive, autoTimeout, duration } = useAppSelector( const { variant, message, isActive, autoTimeout, duration } = useAppSelector(
...@@ -28,10 +28,9 @@ export default function Toast() { ...@@ -28,10 +28,9 @@ export default function Toast() {
return ( return (
<Snackbar <Snackbar
open={isActive} open={isActive}
anchorOrigin={{ vertical: "bottom", horizontal: "right" }}
onClose={() => dispatch(closeToast())} onClose={() => dispatch(closeToast())}
autoHideDuration={autoTimeout ? duration || 3000 : null} autoHideDuration={autoTimeout ? duration || 3000 : null}
sx={{ zIndex: 9999 }} sx={{ position: "relative" }}
> >
<Alert <Alert
severity={currentVariant as "success" | "error" | "warning" | "info"} severity={currentVariant as "success" | "error" | "warning" | "info"}
......
"use client"; "use client";
import GlassWrapper from '@/components/molecules/GlassWrapper'; import GlassWrapper from '@/components/molecules/GlassWrapper';
import { useAppSelector } from '@/hooks/hook'; import { useAppSelector } from '@/hooks/hook';
import EditIcon from '@/icons/EditIcon' import EditIcon from '@/icons/EditIcon';
import { formatDateTime } from '@/utils/formatDateTime'; import { formatDateTime } from '@/utils/formatDateTime';
import Image from 'next/image' import Image from 'next/image';
import React from 'react' import AgeGate from '../dialog/AgeGate';
export default function UserProfileCard({ balance, loading }: { balance: any; loading?: boolean }) { export default function UserProfileCard({ balance, loading }: { balance: any; loading?: boolean }) {
const user = useAppSelector(state => state?.auth.user); const user = useAppSelector(state => state?.auth.user);
...@@ -56,11 +56,16 @@ export default function UserProfileCard({ balance, loading }: { balance: any; lo ...@@ -56,11 +56,16 @@ export default function UserProfileCard({ balance, loading }: { balance: any; lo
<div className="flex justify-center items-center gap-3"> <div className="flex justify-center items-center gap-3">
<Image src={"/assets/images/current-balance.svg"} alt='' width={48} height={48} /> <Image src={"/assets/images/current-balance.svg"} alt='' width={48} height={48} />
<div className="content mt-3 text-start"> <div className="content mt-3 text-start">
<strong className="text-[12px] leading-[120%] font-[700] text-white block ">SC:{balance?.data?.current_balance}</strong> <strong className="text-[12px] leading-[120%] font-[700] text-white block ">SC : {balance?.data?.current_balance.toFixed(2)}</strong>
<span className="text-white text-[9px]">Current Balance</span> <span className="text-white text-[9px]">Current Balance</span>
</div> </div>
</div> </div>
</div> </div>
{/* <Button variant="contained" color="primary" fullWidth className='col-span-1 md:col-span-2 mt-2' >
Verify Account Now
</Button> */}
<AgeGate />
{/* <div className="col-span-2 flex flex-col sm:flex-row gap-2"> {/* <div className="col-span-2 flex flex-col sm:flex-row gap-2">
<div className="w-full rounded-[14px] p-4 lg:py-6 flex justify-center sm:block text-left sm:text-center gap-3" style={{ background: "rgba(191, 26, 198, 0.10)" }}> <div className="w-full rounded-[14px] p-4 lg:py-6 flex justify-center sm:block text-left sm:text-center gap-3" style={{ background: "rgba(191, 26, 198, 0.10)" }}>
<Image src={"/assets/images/deposit.svg"} alt='' width={48} height={48} className='sm:mx-auto' /> <Image src={"/assets/images/deposit.svg"} alt='' width={48} height={48} className='sm:mx-auto' />
......
import Avatar from '@/components/atom/Avatar'; import Avatar from '@/components/atom/Avatar';
import { useAppDispatch, useAppSelector } from '@/hooks/hook'; import { useAppDispatch, useAppSelector } from '@/hooks/hook';
import { PATH } from '@/routes/PATH'; import { PATH } from '@/routes/PATH';
import { useGetAgeGateUuidQuery } from '@/services/authApi'; import { useGetAgeGateUuidMutation } from '@/services/authApi';
import { clearTokens } from '@/slice/authSlice'; import { clearTokens } from '@/slice/authSlice';
import { Box, ClickAwayListener, Fade, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Paper, Popper } from '@mui/material'; import { Box, ClickAwayListener, Fade, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Paper, Popper, Tooltip, Typography } from '@mui/material';
import { ArrowDown2, Coin, Logout, MoneySend, Profile, TickCircle, Wallet2 } from "@wandersonalwes/iconsax-react"; import { ArrowDown2, CloseCircle, Coin, Logout, MoneySend, Profile, TickCircle, Wallet2 } from "@wandersonalwes/iconsax-react";
import Link from 'next/link'; import Link from 'next/link';
import { usePathname, useRouter, useSearchParams } from 'next/navigation'; import { usePathname, useRouter, useSearchParams } from 'next/navigation';
import React, { useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
const avataur1 = '/assets/images/avatar-6.png'; const avataur1 = '/assets/images/avatar-6.png';
...@@ -106,7 +106,25 @@ export default function ProfileBlock() { ...@@ -106,7 +106,25 @@ export default function ProfileBlock() {
setGlassStyle((prev) => ({ ...prev, opacity: 0 })); setGlassStyle((prev) => ({ ...prev, opacity: 0 }));
}; };
const { data } = useGetAgeGateUuidQuery(); const [getAgeGateUuid] = useGetAgeGateUuidMutation();
const [isVerified, setIsVerified] = useState<boolean | null>(null);
useEffect(() => {
const fetchAgeStatus = async () => {
try {
const res = await getAgeGateUuid().unwrap();
setIsVerified(res?.data?.is_age_verified);
} catch (e) {
console.log(e)
// console.error("Failed to fetch age verification status", err);
setIsVerified(false);
}
};
fetchAgeStatus();
}, [getAgeGateUuid])
return ( return (
<Box > <Box >
...@@ -121,21 +139,29 @@ export default function ProfileBlock() { ...@@ -121,21 +139,29 @@ export default function ProfileBlock() {
padding: 0 padding: 0
}} }}
> >
<div className=' lg:flex items-center gap-1 relative'> <Tooltip title={isVerified ? "Verified" : "Not Verified"} placement="bottom">
<Avatar alt="profile user" src={avataur1} /> <div className=' lg:flex items-center gap-1 relative'>
{user?.role && user.role.toLowerCase() !== "user" ? <> <Avatar alt="profile user" src={avataur1} />
<div className=' hidden lg:block'> {user?.role && user.role.toLowerCase() !== "user" ? <>
<strong className='text-[14px] leading-[120%] font-bold text-text-title block mb-1 text-nowrap'>{user?.name}</strong> <div className=' hidden lg:block'>
<p className='text-[12px] text-left leading-[120%] font-[500] text-para-light text-nowrap'> <strong className='text-[14px] leading-[120%] font-bold text-text-title block mb-1 text-nowrap'>{user?.name}</strong>
{user?.role || "User"} <p className='text-[12px] text-left leading-[120%] font-[500] text-para-light text-nowrap'>
</p> {user?.role || "User"}
</p>
</div>
<ArrowDown2 size={14} className='text-primary hidden lg:block' />
</> : ""}
<div className="absolute bottom-0 right-0">
{isVerified ? (
<TickCircle variant="Bold" size={14} className="text-green-600" />
) : (
<span className="flex items-center justify-center w-[14px] h-[14px] rounded-full bg-yellow-400 text-[10px] font-bold text-white">
!
</span>
)}
</div> </div>
<ArrowDown2 size={14} className='text-primary hidden lg:block' />
</> : ""}
<div className="absolute bottom-0 right-0">
{data?.data?.is_age_verified ? <TickCircle variant='Bold' size={16} className="text-green-500" /> : <TickCircle variant='Bold' size={16} className="text-white" />}
</div> </div>
</div> </Tooltip>
</a> </a>
<Popper <Popper
id={id} id={id}
...@@ -150,7 +176,7 @@ export default function ProfileBlock() { ...@@ -150,7 +176,7 @@ export default function ProfileBlock() {
<Paper <Paper
elevation={3} elevation={3}
sx={{ sx={{
width: 215, width: 315,
borderRadius: 2, borderRadius: 2,
mt: 1, mt: 1,
}} }}
...@@ -203,6 +229,7 @@ export default function ProfileBlock() { ...@@ -203,6 +229,7 @@ export default function ProfileBlock() {
> >
<ListItemIcon className="min-w-[30px] mr-1 group-hover:text-primary">{item.icon}</ListItemIcon> <ListItemIcon className="min-w-[30px] mr-1 group-hover:text-primary">{item.icon}</ListItemIcon>
<ListItemText primary={item.label} className='group-hover:text-primary' /> <ListItemText primary={item.label} className='group-hover:text-primary' />
</Link> : <ListItemButton </Link> : <ListItemButton
href={item.href || ""} href={item.href || ""}
onClick={item.onClick} onClick={item.onClick}
...@@ -255,6 +282,25 @@ export default function ProfileBlock() { ...@@ -255,6 +282,25 @@ export default function ProfileBlock() {
> >
<ListItemIcon className="min-w-[30px] mr-1 group-hover:text-primary">{item.icon}</ListItemIcon> <ListItemIcon className="min-w-[30px] mr-1 group-hover:text-primary">{item.icon}</ListItemIcon>
<ListItemText primary={item.label} className='group-hover:text-primary' /> <ListItemText primary={item.label} className='group-hover:text-primary' />
{item.label === "Profile" && (
<div
className={`status flex flex-nowrap items-center gap-1 ml-auto p-1.5 rounded
${isVerified
? "bg-green-600/40 text-green-600"
: "bg-red-600/40 text-red-600"
}`}
>
{isVerified ? (
<TickCircle variant="Bold" size={12} />
) : (
<CloseCircle variant="Bold" size={12} />
)}
<Typography className="text-[10px]!">
{isVerified ? "Verified" : "Not Verified"}
</Typography>
</div>
)}
</Link> : </Link> :
<ListItemButton <ListItemButton
href={item.href || ""} href={item.href || ""}
...@@ -263,6 +309,7 @@ export default function ProfileBlock() { ...@@ -263,6 +309,7 @@ export default function ProfileBlock() {
> >
<ListItemIcon className="min-w-[30px] mr-1 group-hover:text-primary">{item.icon}</ListItemIcon> <ListItemIcon className="min-w-[30px] mr-1 group-hover:text-primary">{item.icon}</ListItemIcon>
<ListItemText primary={item.label} className='group-hover:text-primary' /> <ListItemText primary={item.label} className='group-hover:text-primary' />
</ListItemButton>} </ListItemButton>}
</ListItem> </ListItem>
))} ))}
......
"use client"; "use client";
import { useGetAgeGateUuidQuery, useVerifyAgeGateMutation } from "@/services/authApi"; import { useAppDispatch } from "@/hooks/hook";
import { useCallback, useEffect } from "react"; import { useGetAgeGateUuidMutation, useVerifyAgeGateMutation } from "@/services/authApi";
import { showToast, ToastVariant } from "@/slice/toastSlice";
import { Button } from "@mui/material";
import { useCallback } from "react";
export default function AgeGate() { export default function AgeGate() {
const { data, isSuccess } = useGetAgeGateUuidQuery();
const [getAgeGateUuid, { isLoading }] = useGetAgeGateUuidMutation();
const [verifyAgeGate] = useVerifyAgeGateMutation(); const [verifyAgeGate] = useVerifyAgeGateMutation();
const dispatch = useAppDispatch();
const handleSuccess = useCallback(async (uuid: string) => { const handleSuccess = useCallback(async (uuid: string) => {
try { try {
await verifyAgeGate({ age_verify_uuid: uuid }).unwrap(); await verifyAgeGate({ age_verify_uuid: uuid }).unwrap();
...@@ -15,46 +20,68 @@ export default function AgeGate() { ...@@ -15,46 +20,68 @@ export default function AgeGate() {
} }
}, [verifyAgeGate]); }, [verifyAgeGate]);
console.log("AgeGate data:", data?.data?.age_verify_uuid, "isSuccess:", isSuccess); const openAgeGate = async () => {
try {
useEffect(() => { const res = await getAgeGateUuid().unwrap();
if (!isSuccess || !data?.data?.age_verify_uuid) return;
if (data.data.is_age_verified) return; const uuid = res?.data?.age_verify_uuid;
const uuid = data.data.age_verify_uuid; const verified = res?.data?.is_age_verified;
(window as any).AgeCheckerConfig = { if (!uuid || verified) return;
key: process.env.NEXT_PUBLIC_AGE_CHECKER_KEY,
mode: "manual", (window as any).AgeCheckerConfig = {
autoload: true, key: process.env.NEXT_PUBLIC_AGE_CHECKER_KEY,
show_close: true, mode: "manual",
onready: () => { autoload: true,
(window as any).AgeCheckerAPI.show(uuid); show_close: true,
}, onready: () => {
onstatuschanged: (verification: { uuid: string; status: string }) => { (window as any).AgeCheckerAPI.show(uuid);
if (verification.status === "accepted") { },
handleSuccess(verification.uuid); onstatuschanged: (verification: { uuid: string; status: string }) => {
if (verification.status === "accepted") {
handleSuccess(verification.uuid);
}
},
onpagehide: () => {
(window as any).AgeCheckerAPI.close();
} }
}, };
onpagehide: () => {
(window as any).AgeCheckerAPI.close(); const existing = document.querySelector('script[src*="agechecker.net"]');
if (existing) {
(window as any).AgeCheckerAPI?.show(uuid);
return;
} }
};
const existing = document.querySelector('script[src*="agechecker.net"]'); const script = document.createElement("script");
if (existing) { script.src = "https://cdn.agechecker.net/static/popup/v1/popup.js";
(window as any).AgeCheckerAPI?.show(uuid); script.crossOrigin = "anonymous";
return;
}
const script = document.createElement("script"); script.onerror = () => {
script.src = "https://cdn.agechecker.net/static/popup/v1/popup.js"; window.location.href = "https://agechecker.net/loaderror";Pp
script.crossOrigin = "anonymous"; };
script.onerror = () => {
window.location.href = "https://agechecker.net/loaderror";
};
document.head.insertBefore(script, document.head.firstChild);
}, [isSuccess, data, handleSuccess]); document.head.insertBefore(script, document.head.firstChild);
} catch (err: any) {
dispatch(showToast({
message: err?.data?.message || "Failed to initiate age verification. Please try again.",
variant: ToastVariant.ERROR
}))
}
};
return null; return (
<Button
variant="contained"
color="primary"
fullWidth
className="col-span-1 md:col-span-2 mt-2"
onClick={openAgeGate}
disabled={isLoading}
>
{isLoading ? "Loading..." : "Verify Account Now"}
</Button>
);
} }
\ No newline at end of file
...@@ -135,7 +135,7 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel } ...@@ -135,7 +135,7 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel }
</div> </div>
<div className="input__field"> <div className="input__field">
<InputLabel htmlFor="address">Address</InputLabel> <InputLabel htmlFor="address">Address <span className="text-red-500">*</span></InputLabel>
<OutlinedInput <OutlinedInput
fullWidth fullWidth
id="address" id="address"
...@@ -151,7 +151,7 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel } ...@@ -151,7 +151,7 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel }
</div> </div>
<div className="input__field"> <div className="input__field">
<InputLabel htmlFor="city">City</InputLabel> <InputLabel htmlFor="city">City <span className="text-red-500">*</span></InputLabel>
<OutlinedInput <OutlinedInput
fullWidth fullWidth
id="city" id="city"
...@@ -167,7 +167,7 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel } ...@@ -167,7 +167,7 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel }
</div> </div>
<div className="input__field"> <div className="input__field">
<InputLabel htmlFor="phone">Phone</InputLabel> <InputLabel htmlFor="phone">Phone <span className="text-red-500">*</span></InputLabel>
<OutlinedInput <OutlinedInput
fullWidth fullWidth
id="phone" id="phone"
...@@ -181,6 +181,21 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel } ...@@ -181,6 +181,21 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel }
{formik.touched.phone && formik.errors.phone ? formik.errors.phone : ""} {formik.touched.phone && formik.errors.phone ? formik.errors.phone : ""}
</span> </span>
</div> </div>
<div className="input__field">
<InputLabel htmlFor="zip_code">Zip Code <span className="text-red-500">*</span></InputLabel>
<OutlinedInput
fullWidth
id="zip_code"
name="zip_code"
placeholder="Enter zip code"
value={formik.values.zip_code}
onChange={formik.handleChange}
onBlur={formik.handleBlur}
/>
<span className="error">
{formik.touched.phone && formik.errors.phone ? formik.errors.phone : ""}
</span>
</div>
{/* DOB */} {/* DOB */}
<div className="input__field"> <div className="input__field">
......
...@@ -18,11 +18,12 @@ export const PlayerValidationSchema = (isEdit: boolean) => Yup.object().shape({ ...@@ -18,11 +18,12 @@ export const PlayerValidationSchema = (isEdit: boolean) => Yup.object().shape({
first_name: Yup.string().required("First name is required"), first_name: Yup.string().required("First name is required"),
last_name: Yup.string().required("Last name is required"), last_name: Yup.string().required("Last name is required"),
wallet_address: Yup.string().nullable(), wallet_address: Yup.string().nullable(),
address: Yup.string().nullable(), address: Yup.string().required("Address is required"),
city: Yup.string().nullable(), city: Yup.string().required("City is required"),
zip_code: Yup.string().required("Zip code is required"),
phone: Yup.string() phone: Yup.string()
.matches(/^\+?\d{7,15}$/, "Invalid phone number") .matches(/^\+?\d{7,15}$/, "Invalid phone number")
.nullable(), .required("Phone is required"),
password: isEdit password: isEdit
? Yup.string().nullable() // not required in edit mode ? Yup.string().nullable() // not required in edit mode
: Yup.string().min(6, "Password must be at least 6 characters").required("Password is required"), : Yup.string().min(6, "Password must be at least 6 characters").required("Password is required"),
...@@ -67,6 +68,7 @@ export default function AddPlayerPage({ id }: { id?: string }) { ...@@ -67,6 +68,7 @@ export default function AddPlayerPage({ id }: { id?: string }) {
password_confirmation: data?.data.password_confirmation, password_confirmation: data?.data.password_confirmation,
profile_image: null, profile_image: null,
dob: data?.data.dob || null as Dayjs | null, dob: data?.data.dob || null as Dayjs | null,
zip_code: data?.data.zip_code || "",
} : initialPlayerValues, } : initialPlayerValues,
validationSchema: PlayerValidationSchema(!!id), validationSchema: PlayerValidationSchema(!!id),
enableReinitialize: true, enableReinitialize: true,
......
...@@ -10,7 +10,6 @@ import dayjs, { Dayjs } from 'dayjs'; ...@@ -10,7 +10,6 @@ import dayjs, { Dayjs } from 'dayjs';
import { useFormik } from 'formik'; import { useFormik } from 'formik';
export default function EditUserProfile({ id, buttonLabel }: { id: string, buttonLabel?: string; }) { export default function EditUserProfile({ id, buttonLabel }: { id: string, buttonLabel?: string; }) {
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
const [updateUserProfile, { isLoading }] = useUpdateUserProfileMutation(); const [updateUserProfile, { isLoading }] = useUpdateUserProfileMutation();
const user = useAppSelector((state) => state?.auth.user); const user = useAppSelector((state) => state?.auth.user);
...@@ -31,6 +30,7 @@ export default function EditUserProfile({ id, buttonLabel }: { id: string, butto ...@@ -31,6 +30,7 @@ export default function EditUserProfile({ id, buttonLabel }: { id: string, butto
password_confirmation: '', password_confirmation: '',
profile_image: null, profile_image: null,
dob: user.dob || null as Dayjs | null, dob: user.dob || null as Dayjs | null,
zip_code: user.zip_code || "",
} : initialPlayerValues, } : initialPlayerValues,
validationSchema: PlayerValidationSchema(user?.id ? true : false), validationSchema: PlayerValidationSchema(user?.id ? true : false),
enableReinitialize: true, enableReinitialize: true,
......
...@@ -98,7 +98,9 @@ export default function CheckoutPage({ amount, slug, bonus }: { ...@@ -98,7 +98,9 @@ export default function CheckoutPage({ amount, slug, bonus }: {
</GlassWrapper> </GlassWrapper>
</div> </div>
</div> </div>
{currentPaymentMode === "fortpay" ? <PaymentForm id={slug} amount={amount} type={currentPaymentMode as PaymentModeProps} /> : ""} {currentPaymentMode === "fortpay" ? <>
<PaymentForm id={slug} amount={amount} type={currentPaymentMode as PaymentModeProps} />
</> : ""}
{currentPaymentMode === "crypto" ? <Button type='submit' variant='contained' color='primary' className='!mt-3' onClick={async () => { {currentPaymentMode === "crypto" ? <Button type='submit' variant='contained' color='primary' className='!mt-3' onClick={async () => {
try { try {
if (currentPaymentMode === "crypto") { if (currentPaymentMode === "crypto") {
......
...@@ -63,7 +63,7 @@ export const authApi = createApi({ ...@@ -63,7 +63,7 @@ export const authApi = createApi({
}, },
}) })
}), }),
getAgeGateUuid: builder.query<GlobalResponse & { data: { age_verify_uuid: string, is_age_verified: boolean } }, void>({ getAgeGateUuid: builder.mutation<GlobalResponse & { data: { age_verify_uuid: string, is_age_verified: boolean } }, void>({
query: () => ({ query: () => ({
url: `/api/user/age-verify`, url: `/api/user/age-verify`,
method: "GET", method: "GET",
...@@ -79,4 +79,4 @@ export const authApi = createApi({ ...@@ -79,4 +79,4 @@ export const authApi = createApi({
}) })
}) })
export const { useLoginMutation, useRegisterUserMutation, useSendVerificationLinkAgainMutation, useForgotPasswordMutation, useVerifyOTPMutation, useResetPasswordMutation, useVerifyEmailMutation, useGetAgeGateUuidQuery, useVerifyAgeGateMutation } = authApi; export const { useLoginMutation, useRegisterUserMutation, useSendVerificationLinkAgainMutation, useForgotPasswordMutation, useVerifyOTPMutation, useResetPasswordMutation, useVerifyEmailMutation, useGetAgeGateUuidMutation, useVerifyAgeGateMutation } = authApi;
\ No newline at end of file \ No newline at end of file
...@@ -37,11 +37,11 @@ export interface RegisterProps extends LoginProps { ...@@ -37,11 +37,11 @@ export interface RegisterProps extends LoginProps {
last_name: string; last_name: string;
phone: string; phone: string;
// photoid_number: string; // photoid_number: string;
dob: string; dob?: string;
city: string; city?: string;
pob: string; pob?: string;
agree: boolean; agree: boolean;
device_id?: string; device_id?: string;
visitor_id?: string; visitor_id?: string;
country_code: string; country_code?: string;
} }
\ No newline at end of file
...@@ -16,6 +16,8 @@ export interface CommonPlayerProps { ...@@ -16,6 +16,8 @@ export interface CommonPlayerProps {
role?: string; role?: string;
state?: string; state?: string;
dob?: string | Dayjs | null; dob?: string | Dayjs | null;
zip_code?: string;
} }
export interface PlayerProps extends CommonPlayerProps { export interface PlayerProps extends CommonPlayerProps {
id?: string; id?: string;
...@@ -40,6 +42,7 @@ export const initialPlayerValues: PlayerProps = { ...@@ -40,6 +42,7 @@ export const initialPlayerValues: PlayerProps = {
password_confirmation: "", password_confirmation: "",
profile_image: null, profile_image: null,
dob: null as Dayjs | null, dob: null as Dayjs | null,
zip_code: "",
}; };
type GameInformation = { type GameInformation = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment