@opexa/portal-components 0.0.153 → 0.0.154
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.
|
@@ -84,7 +84,14 @@ export function Withdrawal() {
|
|
|
84
84
|
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, {})] }));
|
|
85
85
|
}
|
|
86
86
|
function AccountVerificationRequired() {
|
|
87
|
-
|
|
87
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
88
|
+
kyc: ctx.kyc,
|
|
89
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
90
|
+
})));
|
|
91
|
+
return (_jsxs("div", { className: "pt-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Personal Verification" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "To withdraw funds, you must first verify your identity. Complete personal verification to ensure your account\u2019s security." }), _jsx(Button, { className: "mt-3xl", onClick: () => {
|
|
92
|
+
globalStore.kyc.setOpen(true);
|
|
93
|
+
globalStore.depositWithdrawal.setOpen(false);
|
|
94
|
+
}, children: "Verify Now" })] }));
|
|
88
95
|
}
|
|
89
96
|
function InsufficientBalance() {
|
|
90
97
|
const setTab = useGlobalStore(useShallow((ctx) => ctx.depositWithdrawal.setTab));
|
|
@@ -22,8 +22,11 @@ export function MessagesPopup() {
|
|
|
22
22
|
const messagesProps = useMessagesPropsContext();
|
|
23
23
|
const transactionsPageUrl = messagesProps.transactionsPageUrl ?? '/transactions';
|
|
24
24
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
25
|
+
kyc: ctx.kyc,
|
|
25
26
|
message: ctx.message,
|
|
26
27
|
messages: ctx.messages,
|
|
28
|
+
gameLaunch: ctx.gameLaunch,
|
|
29
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
27
30
|
})));
|
|
28
31
|
const markMessageAsReadMutation = useMarkMessageAsReadMutation();
|
|
29
32
|
const [paused, setPaused] = useState(false);
|
|
@@ -53,7 +56,12 @@ export function MessagesPopup() {
|
|
|
53
56
|
},
|
|
54
57
|
},
|
|
55
58
|
}, {
|
|
56
|
-
enabled:
|
|
59
|
+
enabled: globalStore.gameLaunch.details.status === 'WAITING' &&
|
|
60
|
+
!globalStore.depositWithdrawal.open &&
|
|
61
|
+
!globalStore.messages.open &&
|
|
62
|
+
!globalStore.message.open &&
|
|
63
|
+
!globalStore.kyc.open &&
|
|
64
|
+
!paused,
|
|
57
65
|
refetchInterval: disclosure.open ? undefined : 10_000,
|
|
58
66
|
});
|
|
59
67
|
const messages = messagesQuery.data?.pages.flatMap((page) => page.edges.map((edge) => edge.node)) ?? [];
|
|
@@ -65,7 +73,7 @@ export function MessagesPopup() {
|
|
|
65
73
|
}, [disclosure, messages.length, paused]);
|
|
66
74
|
return (_jsx(Dialog.Root, { open: disclosure.open, onOpenChange: (details) => {
|
|
67
75
|
disclosure.setOpen(details.open);
|
|
68
|
-
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+
|
|
76
|
+
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto min-w-[21.438rem] max-w-[21.438rem] rounded-xl p-3xl lg:min-w-[25rem] lg:max-w-[25rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Carousel.Root, { page: page, onPageChange: (details) => {
|
|
69
77
|
setPage(details.page);
|
|
70
78
|
const message = messages.at(details.page - 1);
|
|
71
79
|
if (!message)
|