@opexa/portal-components 0.0.843 → 0.0.845
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DepositWithdrawal/PaymentMethods.js +20 -10
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.js +143 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js +143 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +2 -1
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +13 -1
- package/dist/components/DepositWithdrawal/utils.d.ts +1 -1
- package/dist/components/DepositWithdrawal/utils.js +2 -0
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +1 -0
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +12 -0
- package/dist/components/Tournaments/TournamentsList/TournamentsList.d.ts +12 -0
- package/dist/components/Tournaments/TournamentsList/TournamentsList.js +6 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +252 -252
- package/dist/ui/Menu/menu.recipe.d.ts +14 -14
- package/dist/ui/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/package.json +1 -1
- package/dist/components/AccountInfo/GoogleDisconnect.d.ts +0 -7
- package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
- package/dist/components/DepositWithdrawal/AiOPaymentMethods.d.ts +0 -11
- package/dist/components/DepositWithdrawal/AiOPaymentMethods.js +0 -55
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .js +0 -191
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.js +0 -11
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.js +0 -11
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.js +0 -126
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.js +0 -12
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +0 -17
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.js +0 -41
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.js +0 -91
- package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
- package/dist/components/DigitainLauncher/Loading.js +0 -5
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
- package/dist/components/KYC/BasicInformation.d.ts +0 -1
- package/dist/components/KYC/BasicInformation.js +0 -101
- package/dist/components/KYC/IdentityVerification.d.ts +0 -1
- package/dist/components/KYC/IdentityVerification.js +0 -120
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -8
- package/dist/components/KYC/KYC.lazy.d.ts +0 -6
- package/dist/components/KYC/KYC.lazy.js +0 -45
- package/dist/components/KYC/KYCContext.d.ts +0 -6
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/PersonalInformation.d.ts +0 -1
- package/dist/components/KYC/PersonalInformation.js +0 -122
- package/dist/components/KYC/useKYC.d.ts +0 -25
- package/dist/components/KYC/useKYC.js +0 -38
- package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
- package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
- package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
- package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
- package/dist/components/SessionWatcher/index.d.ts +0 -1
- package/dist/components/SessionWatcher/index.js +0 -1
- package/dist/icons/LinkBrokenIcon.d.ts +0 -2
- package/dist/icons/LinkBrokenIcon.js +0 -4
- package/dist/images/responsible-gaming-yellow.png +0 -0
|
@@ -31,6 +31,16 @@ const OPTIONS = [
|
|
|
31
31
|
label: 'Maya',
|
|
32
32
|
image: maya,
|
|
33
33
|
},
|
|
34
|
+
{
|
|
35
|
+
value: 'AIO_GCASH',
|
|
36
|
+
label: 'GCash',
|
|
37
|
+
image: gcash,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
value: 'AIO_PAY_MAYA',
|
|
41
|
+
label: 'Maya',
|
|
42
|
+
image: maya,
|
|
43
|
+
},
|
|
34
44
|
{
|
|
35
45
|
value: 'QRPH',
|
|
36
46
|
label: 'QRPH',
|
|
@@ -41,6 +51,16 @@ const OPTIONS = [
|
|
|
41
51
|
label: 'Online Bank',
|
|
42
52
|
image: onlineBank,
|
|
43
53
|
},
|
|
54
|
+
{
|
|
55
|
+
value: 'INSTAPAY_GCASH',
|
|
56
|
+
label: 'Instapay GCash',
|
|
57
|
+
image: gcash,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: 'INSTAPAY_PAYMAYA',
|
|
61
|
+
label: 'Instapay PayMaya',
|
|
62
|
+
image: maya,
|
|
63
|
+
},
|
|
44
64
|
{
|
|
45
65
|
value: 'INSTAPAY',
|
|
46
66
|
label: 'Instapay',
|
|
@@ -61,16 +81,6 @@ const OPTIONS = [
|
|
|
61
81
|
label: 'Piso Pay',
|
|
62
82
|
image: pisoPay,
|
|
63
83
|
},
|
|
64
|
-
{
|
|
65
|
-
value: 'AIO_GCASH',
|
|
66
|
-
label: 'GCash',
|
|
67
|
-
image: gcash,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
value: 'AIO_PAY_MAYA',
|
|
71
|
-
label: 'Maya',
|
|
72
|
-
image: maya,
|
|
73
|
-
},
|
|
74
84
|
{
|
|
75
85
|
value: 'AIO_GRAB_PAY',
|
|
76
86
|
label: 'GrabPay',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InstapayGCashWithdrawal(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import { useForm } from 'react-hook-form';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { useShallow } from 'zustand/shallow';
|
|
8
|
+
import { useAccountQuery } from '../../../../client/hooks/useAccountQuery.js';
|
|
9
|
+
import { useCreateInstapayWithdrawalMutation } from '../../../../client/hooks/useCreateInstapayWithdrawalMutation.js';
|
|
10
|
+
import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
|
|
11
|
+
import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
|
|
12
|
+
import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
|
|
13
|
+
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
14
|
+
import { EyeIcon } from '../../../../icons/EyeIcon.js';
|
|
15
|
+
import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
|
|
16
|
+
import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
|
|
17
|
+
import { XIcon } from '../../../../icons/XIcon.js';
|
|
18
|
+
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
19
|
+
import { Button } from '../../../../ui/Button/index.js';
|
|
20
|
+
import { Field } from '../../../../ui/Field/index.js';
|
|
21
|
+
import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
|
|
22
|
+
import { Portal } from '../../../../ui/Portal/index.js';
|
|
23
|
+
import { parseDecimal } from '../../../../utils/parseDecimal.js';
|
|
24
|
+
import { AmountChoices } from '../../AmountChoices.js';
|
|
25
|
+
import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
|
|
26
|
+
import { explainError } from '../../utils.js';
|
|
27
|
+
import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
|
|
28
|
+
import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
|
|
29
|
+
import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
|
|
30
|
+
export function InstapayGCashWithdrawal() {
|
|
31
|
+
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
32
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
33
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
34
|
+
hasPendingBonus: ctx.pendingBonus,
|
|
35
|
+
})));
|
|
36
|
+
const [status, setStatus] = useState('waiting');
|
|
37
|
+
const createWithdrawalMutation = useCreateInstapayWithdrawalMutation({
|
|
38
|
+
onMutate() {
|
|
39
|
+
setStatus('processing');
|
|
40
|
+
},
|
|
41
|
+
onSuccess() {
|
|
42
|
+
form.reset();
|
|
43
|
+
setStatus('success');
|
|
44
|
+
},
|
|
45
|
+
onError() {
|
|
46
|
+
setStatus('failed');
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
const accountQuery = useAccountQuery();
|
|
50
|
+
const walletQuery = useWalletQuery();
|
|
51
|
+
const turnoverRequirement = parseDecimal(walletQuery.data?.turnoverRequirement, 0);
|
|
52
|
+
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
53
|
+
const paymentSettings = paymentSettingsQuery.data;
|
|
54
|
+
const gatewaySettings = paymentSettings?.instapayWithdrawalGatewaySettings;
|
|
55
|
+
const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
56
|
+
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
57
|
+
const definition = z.object({
|
|
58
|
+
amount: z.string().superRefine((val, ctx) => {
|
|
59
|
+
const n = parseDecimal(val, 0);
|
|
60
|
+
if (val.includes('.')) {
|
|
61
|
+
ctx.addIssue({
|
|
62
|
+
code: z.ZodIssueCode.custom,
|
|
63
|
+
message: 'Amount must be a whole number',
|
|
64
|
+
});
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (n < minimumAmount) {
|
|
68
|
+
ctx.addIssue({
|
|
69
|
+
type: 'number',
|
|
70
|
+
code: z.ZodIssueCode.too_small,
|
|
71
|
+
inclusive: true,
|
|
72
|
+
minimum: minimumAmount,
|
|
73
|
+
message: `Please enter ${minimumAmount.toLocaleString()} or more to proceed with your deposit.`,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
if (n > maximumAmount) {
|
|
77
|
+
ctx.addIssue({
|
|
78
|
+
type: 'number',
|
|
79
|
+
code: z.ZodIssueCode.too_big,
|
|
80
|
+
inclusive: true,
|
|
81
|
+
maximum: maximumAmount,
|
|
82
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}),
|
|
86
|
+
password: z
|
|
87
|
+
.string()
|
|
88
|
+
.min(8, 'Password must be 8 or more characters')
|
|
89
|
+
.max(64, 'Password must be not be more than 64 characters'),
|
|
90
|
+
accountNumber: z.string().min(1).trim(),
|
|
91
|
+
accountName: z
|
|
92
|
+
.string({ required_error: 'Account name is required' })
|
|
93
|
+
.min(4, 'Account name must be at least 4 characters'),
|
|
94
|
+
});
|
|
95
|
+
const form = useForm({
|
|
96
|
+
mode: 'all',
|
|
97
|
+
resolver: zodResolver(definition),
|
|
98
|
+
defaultValues: {
|
|
99
|
+
amount: '0',
|
|
100
|
+
password: '',
|
|
101
|
+
accountNumber: '',
|
|
102
|
+
accountName: accountQuery.data?.realName ?? '',
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (minimumAmount) {
|
|
107
|
+
form.reset({
|
|
108
|
+
amount: minimumAmount.toString(),
|
|
109
|
+
password: '',
|
|
110
|
+
accountNumber: '',
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}, [form, minimumAmount]);
|
|
114
|
+
const handleSubmit = form.handleSubmit(async (data) => {
|
|
115
|
+
if (globalStore.hasPendingBonus.shouldShowWarning) {
|
|
116
|
+
globalStore.hasPendingBonus.setOpen(true);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
createWithdrawalMutation.mutate({
|
|
120
|
+
amount: data.amount,
|
|
121
|
+
transactionPassword: data.password,
|
|
122
|
+
accountNumber: data.accountNumber,
|
|
123
|
+
accountName: data.accountName,
|
|
124
|
+
bankCode: "BNKGCH",
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Phone Number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
|
|
128
|
+
form.setValue('amount', value.toString(), {
|
|
129
|
+
shouldTouch: true,
|
|
130
|
+
shouldDirty: true,
|
|
131
|
+
shouldValidate: true,
|
|
132
|
+
});
|
|
133
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
|
|
134
|
+
if (!details.open) {
|
|
135
|
+
setStatus('waiting');
|
|
136
|
+
}
|
|
137
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
|
|
138
|
+
"We're verifying your account and amount. Please hold a moment.", status === 'success' &&
|
|
139
|
+
'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
|
|
140
|
+
explainError(createWithdrawalMutation.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
141
|
+
api.setOpen(false);
|
|
142
|
+
}, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
|
|
143
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InstapayPaymayaWithdrawal(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import { useForm } from 'react-hook-form';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { useShallow } from 'zustand/shallow';
|
|
8
|
+
import { useAccountQuery } from '../../../../client/hooks/useAccountQuery.js';
|
|
9
|
+
import { useCreateInstapayWithdrawalMutation } from '../../../../client/hooks/useCreateInstapayWithdrawalMutation.js';
|
|
10
|
+
import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
|
|
11
|
+
import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
|
|
12
|
+
import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
|
|
13
|
+
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
14
|
+
import { EyeIcon } from '../../../../icons/EyeIcon.js';
|
|
15
|
+
import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
|
|
16
|
+
import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
|
|
17
|
+
import { XIcon } from '../../../../icons/XIcon.js';
|
|
18
|
+
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
19
|
+
import { Button } from '../../../../ui/Button/index.js';
|
|
20
|
+
import { Field } from '../../../../ui/Field/index.js';
|
|
21
|
+
import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
|
|
22
|
+
import { Portal } from '../../../../ui/Portal/index.js';
|
|
23
|
+
import { parseDecimal } from '../../../../utils/parseDecimal.js';
|
|
24
|
+
import { AmountChoices } from '../../AmountChoices.js';
|
|
25
|
+
import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
|
|
26
|
+
import { explainError } from '../../utils.js';
|
|
27
|
+
import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
|
|
28
|
+
import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
|
|
29
|
+
import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
|
|
30
|
+
export function InstapayPaymayaWithdrawal() {
|
|
31
|
+
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
32
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
33
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
34
|
+
hasPendingBonus: ctx.pendingBonus,
|
|
35
|
+
})));
|
|
36
|
+
const [status, setStatus] = useState('waiting');
|
|
37
|
+
const createWithdrawalMutation = useCreateInstapayWithdrawalMutation({
|
|
38
|
+
onMutate() {
|
|
39
|
+
setStatus('processing');
|
|
40
|
+
},
|
|
41
|
+
onSuccess() {
|
|
42
|
+
form.reset();
|
|
43
|
+
setStatus('success');
|
|
44
|
+
},
|
|
45
|
+
onError() {
|
|
46
|
+
setStatus('failed');
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
const accountQuery = useAccountQuery();
|
|
50
|
+
const walletQuery = useWalletQuery();
|
|
51
|
+
const turnoverRequirement = parseDecimal(walletQuery.data?.turnoverRequirement, 0);
|
|
52
|
+
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
53
|
+
const paymentSettings = paymentSettingsQuery.data;
|
|
54
|
+
const gatewaySettings = paymentSettings?.instapayWithdrawalGatewaySettings;
|
|
55
|
+
const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
56
|
+
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
57
|
+
const definition = z.object({
|
|
58
|
+
amount: z.string().superRefine((val, ctx) => {
|
|
59
|
+
const n = parseDecimal(val, 0);
|
|
60
|
+
if (val.includes('.')) {
|
|
61
|
+
ctx.addIssue({
|
|
62
|
+
code: z.ZodIssueCode.custom,
|
|
63
|
+
message: 'Amount must be a whole number',
|
|
64
|
+
});
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (n < minimumAmount) {
|
|
68
|
+
ctx.addIssue({
|
|
69
|
+
type: 'number',
|
|
70
|
+
code: z.ZodIssueCode.too_small,
|
|
71
|
+
inclusive: true,
|
|
72
|
+
minimum: minimumAmount,
|
|
73
|
+
message: `Please enter ${minimumAmount.toLocaleString()} or more to proceed with your deposit.`,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
if (n > maximumAmount) {
|
|
77
|
+
ctx.addIssue({
|
|
78
|
+
type: 'number',
|
|
79
|
+
code: z.ZodIssueCode.too_big,
|
|
80
|
+
inclusive: true,
|
|
81
|
+
maximum: maximumAmount,
|
|
82
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}),
|
|
86
|
+
password: z
|
|
87
|
+
.string()
|
|
88
|
+
.min(8, 'Password must be 8 or more characters')
|
|
89
|
+
.max(64, 'Password must be not be more than 64 characters'),
|
|
90
|
+
accountNumber: z.string().min(1).trim(),
|
|
91
|
+
accountName: z
|
|
92
|
+
.string({ required_error: 'Account name is required' })
|
|
93
|
+
.min(4, 'Account name must be at least 4 characters'),
|
|
94
|
+
});
|
|
95
|
+
const form = useForm({
|
|
96
|
+
mode: 'all',
|
|
97
|
+
resolver: zodResolver(definition),
|
|
98
|
+
defaultValues: {
|
|
99
|
+
amount: '0',
|
|
100
|
+
password: '',
|
|
101
|
+
accountNumber: '',
|
|
102
|
+
accountName: accountQuery.data?.realName ?? '',
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (minimumAmount) {
|
|
107
|
+
form.reset({
|
|
108
|
+
amount: minimumAmount.toString(),
|
|
109
|
+
password: '',
|
|
110
|
+
accountNumber: '',
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}, [form, minimumAmount]);
|
|
114
|
+
const handleSubmit = form.handleSubmit(async (data) => {
|
|
115
|
+
if (globalStore.hasPendingBonus.shouldShowWarning) {
|
|
116
|
+
globalStore.hasPendingBonus.setOpen(true);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
createWithdrawalMutation.mutate({
|
|
120
|
+
amount: data.amount,
|
|
121
|
+
transactionPassword: data.password,
|
|
122
|
+
accountNumber: data.accountNumber,
|
|
123
|
+
accountName: data.accountName,
|
|
124
|
+
bankCode: "BNKMYA",
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Phone Number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
|
|
128
|
+
form.setValue('amount', value.toString(), {
|
|
129
|
+
shouldTouch: true,
|
|
130
|
+
shouldDirty: true,
|
|
131
|
+
shouldValidate: true,
|
|
132
|
+
});
|
|
133
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
|
|
134
|
+
if (!details.open) {
|
|
135
|
+
setStatus('waiting');
|
|
136
|
+
}
|
|
137
|
+
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
|
|
138
|
+
"We're verifying your account and amount. Please hold a moment.", status === 'success' &&
|
|
139
|
+
'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
|
|
140
|
+
explainError(createWithdrawalMutation.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
141
|
+
api.setOpen(false);
|
|
142
|
+
}, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
|
|
143
|
+
}
|
package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js
CHANGED
|
@@ -41,7 +41,8 @@ const sortBanksWithPriority = (banks) => {
|
|
|
41
41
|
const bIndex = priorityBankCodes.indexOf(b.code);
|
|
42
42
|
return aIndex - bIndex;
|
|
43
43
|
});
|
|
44
|
-
|
|
44
|
+
const sortedOtherBanks = otherBanks.sort((a, b) => a.name.localeCompare(b.name));
|
|
45
|
+
return [...sortedPriorityBanks, ...sortedOtherBanks];
|
|
45
46
|
};
|
|
46
47
|
export function InstapayWithdrawal() {
|
|
47
48
|
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
@@ -17,6 +17,8 @@ import { useDepositWithdrawalPropsContext } from '../DepositWithdrawalContext.js
|
|
|
17
17
|
import { PaymentMethods } from '../PaymentMethods.js';
|
|
18
18
|
import { GCashStandardCashInWithdrawal } from './GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js';
|
|
19
19
|
import { GCashWithdrawal } from './GCashWithdrawal/GCashWithdrawal.js';
|
|
20
|
+
import { InstapayGCashWithdrawal } from './InstapayGCashWithdrawal/InstapayGcashWithdrawal.js';
|
|
21
|
+
import { InstapayPaymayaWithdrawal } from './InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js';
|
|
20
22
|
import { InstapayWithdrawal } from './InstapayWithdrawal/InstapayWithdrawal.js';
|
|
21
23
|
import { MayaAppWithdrawal } from './MayaAppWithdrawal/MayaAppWithdrawal.js';
|
|
22
24
|
import { MayaWithdrawal } from './MayaWithdrawal/MayaWithdrawal.js';
|
|
@@ -48,6 +50,16 @@ export function Withdrawal() {
|
|
|
48
50
|
condition: () => paymentSettings?.gcashWithdrawalGatewaySettings?.[enabledKey] ||
|
|
49
51
|
false,
|
|
50
52
|
},
|
|
53
|
+
{
|
|
54
|
+
method: 'INSTAPAY_GCASH',
|
|
55
|
+
condition: () => paymentSettings?.instapayWithdrawalGatewaySettings?.[enabledKey] ||
|
|
56
|
+
false,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
method: 'INSTAPAY_PAYMAYA',
|
|
60
|
+
condition: () => paymentSettings?.instapayWithdrawalGatewaySettings?.[enabledKey] ||
|
|
61
|
+
false,
|
|
62
|
+
},
|
|
51
63
|
{
|
|
52
64
|
method: 'MAYA',
|
|
53
65
|
condition: () => paymentSettings?.mayaWithdrawalGatewaySettings?.[enabledKey] || false,
|
|
@@ -108,7 +120,7 @@ export function Withdrawal() {
|
|
|
108
120
|
if (enabledPaymentMethods.length <= 0) {
|
|
109
121
|
return _jsx(NoAvailablePaymentMethods, {});
|
|
110
122
|
}
|
|
111
|
-
return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'VENTAJA_DISBURSEMENT' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {}), paymentMethod === 'GCASH_STANDARD_CASH_IN' && (_jsx(GCashStandardCashInWithdrawal, {}))] }));
|
|
123
|
+
return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'INSTAPAY_GCASH' && _jsx(InstapayGCashWithdrawal, {}), paymentMethod === 'INSTAPAY_PAYMAYA' && _jsx(InstapayPaymayaWithdrawal, {}), paymentMethod === 'VENTAJA_DISBURSEMENT' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {}), paymentMethod === 'GCASH_STANDARD_CASH_IN' && (_jsx(GCashStandardCashInWithdrawal, {}))] }));
|
|
112
124
|
}
|
|
113
125
|
function AccountVerificationRequired() {
|
|
114
126
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { KnownDepositError, KnownWithdrawalError, WithdrawalError } from '../../types';
|
|
3
|
-
export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "GCASH_STANDARD_CASH_IN", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY", "GCASH_WEBPAY", "MAYA_WEBPAY"]>;
|
|
3
|
+
export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "GCASH_STANDARD_CASH_IN", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY", "GCASH_WEBPAY", "MAYA_WEBPAY", "INSTAPAY_GCASH", "INSTAPAY_PAYMAYA"]>;
|
|
4
4
|
export type PaymentMethod = z.infer<typeof PaymentMethodDefinition>;
|
|
5
5
|
export type DepositWithdrawalErrors = KnownDepositError | KnownWithdrawalError | WithdrawalError | string;
|
|
6
6
|
export declare function explainError(error?: DepositWithdrawalErrors): string;
|
|
@@ -16,6 +16,8 @@ export const PaymentMethodDefinition = z.enum([
|
|
|
16
16
|
'AIO_PALAWAN_PAY',
|
|
17
17
|
'GCASH_WEBPAY',
|
|
18
18
|
'MAYA_WEBPAY',
|
|
19
|
+
'INSTAPAY_GCASH',
|
|
20
|
+
'INSTAPAY_PAYMAYA',
|
|
19
21
|
]);
|
|
20
22
|
const errorMap = {
|
|
21
23
|
DAILY_PURCHASE_OR_DEPOSIT_LIMIT_EXCEEDED: 'You have exceeded your daily purchase or deposit limit. Please try again tomorrow.',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AndroidOnlyComponents(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Capacitor } from '@capacitor/core';
|
|
4
|
+
import { AndroidRoutingHandler } from './AndroidRoutingHandler.js';
|
|
5
|
+
import PushNotification from './PushNotifications.js';
|
|
6
|
+
export function AndroidOnlyComponents() {
|
|
7
|
+
const platform = Capacitor.getPlatform();
|
|
8
|
+
const isNative = platform === 'android' || platform === 'ios';
|
|
9
|
+
if (!isNative)
|
|
10
|
+
return null;
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(PushNotification, {}), _jsx(AndroidRoutingHandler, {})] }));
|
|
12
|
+
}
|
|
@@ -2,17 +2,29 @@ import type { CSSProperties, ReactNode } from 'react';
|
|
|
2
2
|
import type { GameProvider, GameProviderData } from '../../../types';
|
|
3
3
|
interface ClassNameEntries {
|
|
4
4
|
root?: string;
|
|
5
|
+
itemOuterRoot?: string;
|
|
5
6
|
itemRoot?: string;
|
|
6
7
|
itemBadgeRoot?: string;
|
|
7
8
|
itemBadgeLabel?: string;
|
|
8
9
|
itemBadgeIcon?: string;
|
|
10
|
+
countdownHeading?: string;
|
|
11
|
+
countdownSubheading?: string;
|
|
12
|
+
countdownLabel?: string;
|
|
13
|
+
countdownTime?: string;
|
|
14
|
+
countdownSeparator?: string;
|
|
9
15
|
}
|
|
10
16
|
interface StyleEntries {
|
|
11
17
|
root?: CSSProperties;
|
|
12
18
|
itemRoot?: CSSProperties;
|
|
19
|
+
itemOuterRoot?: CSSProperties;
|
|
13
20
|
itemBadgeRoot?: CSSProperties;
|
|
14
21
|
itemBadgeLabel?: CSSProperties;
|
|
15
22
|
itemBadgeIcon?: CSSProperties;
|
|
23
|
+
countdownHeading?: CSSProperties;
|
|
24
|
+
countdownSubheading?: CSSProperties;
|
|
25
|
+
countdownLabel?: CSSProperties;
|
|
26
|
+
countdownTime?: CSSProperties;
|
|
27
|
+
countdownSeparator?: CSSProperties;
|
|
16
28
|
}
|
|
17
29
|
export interface TournamentsListProps {
|
|
18
30
|
layout: 'list';
|
|
@@ -31,21 +31,27 @@ export function TournamentsList({ style, className, ...props }) {
|
|
|
31
31
|
? { root: className }
|
|
32
32
|
: (className ?? {});
|
|
33
33
|
return (_jsx(TournamentsListPropsContext, { value: props, children: _jsxs("div", { style: styles.root, className: classNames.root, children: [_jsx("div", { className: "mb-3 font-semibold text-lg lg:mb-4.5", children: props.heading ?? 'Tournaments' }), tournaments.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "hidden flex-col gap-6 lg:flex", children: tournaments.map((tournament) => (_jsx(TournamentsListItemContext, { value: tournament, children: _jsx(TournamentsListItemDesktop, { style: {
|
|
34
|
+
...styles,
|
|
34
35
|
root: styles.itemRoot,
|
|
36
|
+
outerRoot: styles.itemOuterRoot,
|
|
35
37
|
badgeIcon: styles.itemBadgeIcon,
|
|
36
38
|
badgeRoot: styles.itemBadgeRoot,
|
|
37
39
|
badgeLabel: styles.itemBadgeLabel,
|
|
38
40
|
}, className: {
|
|
41
|
+
...classNames,
|
|
39
42
|
root: classNames.itemRoot,
|
|
43
|
+
outerRoot: classNames.itemOuterRoot,
|
|
40
44
|
badgeRoot: classNames.itemBadgeRoot,
|
|
41
45
|
badgeLabel: classNames.itemBadgeLabel,
|
|
42
46
|
badgeIcon: classNames.itemBadgeIcon,
|
|
43
47
|
} }) }, tournament.id))) }), _jsx("div", { className: "flex flex-col gap-6 lg:hidden", children: tournaments.map((tournament) => (_jsx(TournamentsListItemContext, { value: tournament, children: _jsx(TournamentsListItemMobile, { style: {
|
|
48
|
+
...styles,
|
|
44
49
|
root: styles.itemRoot,
|
|
45
50
|
badgeIcon: styles.itemBadgeIcon,
|
|
46
51
|
badgeRoot: styles.itemBadgeRoot,
|
|
47
52
|
badgeLabel: styles.itemBadgeLabel,
|
|
48
53
|
}, className: {
|
|
54
|
+
...classNames,
|
|
49
55
|
root: classNames.itemRoot,
|
|
50
56
|
badgeRoot: classNames.itemBadgeRoot,
|
|
51
57
|
badgeLabel: classNames.itemBadgeLabel,
|