@opexa/portal-components 0.0.84 → 0.0.86
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/client/hooks/useAccountQuery.js +2 -6
- package/dist/client/hooks/useAvailablePromosQuery.js +2 -6
- package/dist/client/hooks/useAvailableQuestsQuery.js +2 -6
- package/dist/client/hooks/useBetRecordsQuery.js +2 -6
- package/dist/client/hooks/useBonusQuery.js +2 -6
- package/dist/client/hooks/useBonusesQuery.js +2 -6
- package/dist/client/hooks/useCashbackBonusQuery.js +2 -6
- package/dist/client/hooks/useCashbackBonusesQuery.js +2 -6
- package/dist/client/hooks/useCashbacksQuery.js +1 -3
- package/dist/client/hooks/useCheckInDailyCheckInQuestMutation.js +2 -6
- package/dist/client/hooks/useClaimCashbackBonusMutation.js +2 -5
- package/dist/client/hooks/useClaimSpotBonusMutation.js +2 -5
- package/dist/client/hooks/useCreateGCashDepositMutation.js +5 -10
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.js +4 -7
- package/dist/client/hooks/useCreateGameSessionMutation.js +6 -15
- package/dist/client/hooks/useCreateInstapayWithdrawalMutation.js +4 -7
- package/dist/client/hooks/useCreateMayaAppDepositMutation.js +5 -10
- package/dist/client/hooks/useCreateMayaAppWithdrawalMutation.js +4 -7
- package/dist/client/hooks/useCreateMayaDepositMutation.js +5 -10
- package/dist/client/hooks/useCreateMayaWithdrawalMutation.js +4 -7
- package/dist/client/hooks/useCreateOnlineBankDepositMutation.js +5 -10
- package/dist/client/hooks/useCreateQRPHDepositMutation.js +5 -10
- package/dist/client/hooks/useDepositQuery.js +2 -6
- package/dist/client/hooks/useDepositRecordsQuery.js +2 -6
- package/dist/client/hooks/useDepositsCountQuery.js +2 -6
- package/dist/client/hooks/useEndGameSessionMutation.js +2 -6
- package/dist/client/hooks/useFavoriteGamesQuery.js +2 -6
- package/dist/client/hooks/useInstapayBankListQuery.js +2 -6
- package/dist/client/hooks/useIsMayaSessionValidQuery.js +2 -6
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +2 -5
- package/dist/client/hooks/useMarkMessageAsReadMutation.js +2 -5
- package/dist/client/hooks/useMemberVerificationQuery.js +2 -6
- package/dist/client/hooks/useMessagesQuery.js +2 -6
- package/dist/client/hooks/usePaymentSettingsQuery.js +2 -6
- package/dist/client/hooks/useProfileCompletionQuery.js +2 -6
- package/dist/client/hooks/useTransactionRecordsQuery.js +2 -6
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +2 -5
- package/dist/client/hooks/useUnreadMessagesCountQuery.js +2 -6
- package/dist/client/hooks/useUpdateAccountMutation.js +2 -5
- package/dist/client/hooks/useWalletQuery.js +8 -7
- package/dist/client/hooks/useWithdrawalRecordsQuery.js +2 -6
- package/dist/components/Account/Account.d.ts +0 -2
- package/dist/components/Account/Account.js +10 -8
- package/dist/components/Account/AccountTrigger.d.ts +1 -2
- package/dist/components/Account/AccountTrigger.js +18 -6
- package/dist/components/Bonuses/BonusesTrigger.d.ts +1 -1
- package/dist/components/Bonuses/BonusesTrigger.js +3 -3
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +1 -6
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +8 -19
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +12 -4
- package/dist/components/Messages/Message.d.ts +1 -4
- package/dist/components/Messages/Message.js +8 -9
- package/dist/components/Messages/MessageContext.d.ts +2 -0
- package/dist/components/Messages/MessageContext.js +2 -0
- package/dist/components/Messages/Messages.d.ts +0 -1
- package/dist/components/Messages/Messages.js +9 -8
- package/dist/components/Messages/MessagesTrigger.d.ts +1 -1
- package/dist/components/Messages/MessagesTrigger.js +8 -4
- package/dist/components/PortalProvider/Providers.js +1 -5
- package/dist/components/SignUp/SignUpForm.js +2 -1
- package/dist/handlers.js +1 -0
- package/dist/services/ObjectId.d.ts +0 -14
- package/dist/services/ObjectId.js +62 -76
- package/dist/services/ObjectType.d.ts +10 -0
- package/dist/services/ObjectType.js +10 -0
- package/dist/services/index.d.ts +4 -3
- package/dist/services/index.js +4 -3
- package/dist/styles/theme.css +2 -2
- package/dist/ui/AlertDialog/AlertDialog.d.ts +122 -122
- package/dist/ui/AlertDialog/AlertDialog.js +2 -1
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
- package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
- package/dist/ui/Avatar/Avatar.d.ts +1 -1
- package/dist/ui/Avatar/Avatar.js +1 -1
- package/dist/ui/Avatar/avatar.recipe.js +1 -1
- package/dist/ui/Badge/Badge.js +1 -1
- package/dist/ui/Button/Button.js +1 -1
- package/dist/ui/Checkbox/Checkbox.d.ts +24 -24
- package/dist/ui/Checkbox/Checkbox.js +1 -1
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
- package/dist/ui/Clipboard/Clipboard.d.ts +19 -19
- package/dist/ui/Clipboard/Clipboard.js +1 -1
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/clipboard.recipe.js +1 -1
- package/dist/ui/Collapsible/Collapsible.d.ts +1 -1
- package/dist/ui/Collapsible/Collapsible.js +1 -1
- package/dist/ui/Collapsible/collapsible.recipe.js +1 -1
- package/dist/ui/Combobox/Combobox.d.ts +43 -43
- package/dist/ui/Combobox/Combobox.js +1 -1
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/Combobox/combobox.recipe.js +1 -1
- package/dist/ui/DatePicker/DatePicker.d.ts +337 -337
- package/dist/ui/DatePicker/DatePicker.js +1 -1
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +14 -14
- package/dist/ui/DatePicker/datePicker.recipe.js +1 -1
- package/dist/ui/Dialog/Dialog.d.ts +122 -122
- package/dist/ui/Dialog/Dialog.js +2 -1
- package/dist/ui/Dialog/dialog.recipe.d.ts +11 -11
- package/dist/ui/Dialog/dialog.recipe.js +1 -1
- package/dist/ui/Drawer/Drawer.d.ts +34 -34
- package/dist/ui/Drawer/Drawer.js +2 -1
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Drawer/drawer.recipe.js +1 -1
- package/dist/ui/Field/Field.d.ts +22 -22
- package/dist/ui/Field/Field.js +1 -1
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Field/field.recipe.js +1 -1
- package/dist/ui/IconButton/IconButton.js +1 -1
- package/dist/ui/NumberInput/NumberInput.d.ts +1 -1
- package/dist/ui/NumberInput/NumberInput.js +1 -1
- package/dist/ui/NumberInput/numberInput.recipe.js +1 -1
- package/dist/ui/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/ui/PasswordInput/PasswordInput.js +1 -1
- package/dist/ui/PasswordInput/passwordInput.recipe.js +1 -1
- package/dist/ui/PinInput/PinInput.d.ts +1 -1
- package/dist/ui/PinInput/PinInput.js +1 -1
- package/dist/ui/PinInput/pinInput.recipe.js +1 -1
- package/dist/ui/Popover/Popover.d.ts +89 -89
- package/dist/ui/Popover/Popover.js +1 -1
- package/dist/ui/Popover/popover.recipe.d.ts +8 -8
- package/dist/ui/Popover/popover.recipe.js +1 -1
- package/dist/ui/Progress/Progress.d.ts +1 -1
- package/dist/ui/Progress/Progress.js +1 -1
- package/dist/ui/Progress/progress.recipe.js +1 -1
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +1 -1
- package/dist/ui/SegmentGroup/SegmentGroup.js +1 -1
- package/dist/ui/SegmentGroup/segmentGroup.recipe.js +1 -1
- package/dist/ui/Select/Select.d.ts +46 -46
- package/dist/ui/Select/Select.js +1 -1
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Select/select.recipe.js +1 -1
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/Table.js +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +16 -16
- package/dist/ui/Tabs/Tabs.js +1 -1
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/ui/Tabs/tabs.recipe.js +1 -1
- package/package.json +27 -30
- package/dist/utils/graphqlRequest.d.ts +0 -4
- package/dist/utils/graphqlRequest.js +0 -255
- package/dist/utils/httpRequest.d.ts +0 -6
- package/dist/utils/httpRequest.js +0 -87
- package/dist/utils/sha256.d.ts +0 -4
- package/dist/utils/sha256.js +0 -16
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getDeposit } from '../../services/index.js';
|
|
4
|
-
import { getDepositQueryKey
|
|
4
|
+
import { getDepositQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useDepositQuery = (id, config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useQuery({
|
|
11
10
|
...config,
|
|
@@ -16,10 +15,7 @@ export const useDepositQuery = (id, config) => {
|
|
|
16
15
|
: sessionQuery.data?.status === 'authenticated',
|
|
17
16
|
queryKey: getDepositQueryKey(id),
|
|
18
17
|
queryFn: async ({ signal }) => {
|
|
19
|
-
const session = await
|
|
20
|
-
queryKey: getSessionQueryKey(),
|
|
21
|
-
queryFn: () => getSession(),
|
|
22
|
-
});
|
|
18
|
+
const session = await getSession({ signal });
|
|
23
19
|
invariant(session.status === 'authenticated');
|
|
24
20
|
const deposit = await getDeposit(id, {
|
|
25
21
|
signal,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useInfiniteQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getDepositRecords } from '../../services/index.js';
|
|
4
|
-
import { getDepositRecordsQueryKey
|
|
4
|
+
import { getDepositRecordsQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useDepositRecordsQuery = (input, config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useInfiniteQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useDepositRecordsQuery = (input, config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getDepositRecordsQueryKey(input),
|
|
16
15
|
queryFn: async ({ pageParam, signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
return await getDepositRecords({ ...input, after: pageParam }, {
|
|
23
19
|
signal,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getDepositsCount } from '../../services/index.js';
|
|
4
|
-
import { getDepositsCountQueryKey
|
|
4
|
+
import { getDepositsCountQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useDepositsCountQuery = (config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useDepositsCountQuery = (config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getDepositsCountQueryKey(),
|
|
16
15
|
queryFn: async ({ signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
const depositsCount = await getDepositsCount({
|
|
23
19
|
signal,
|
|
@@ -2,18 +2,14 @@ import { useMutation } from '@tanstack/react-query';
|
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { LEGACY_GAME_PROVIDERS } from '../../constants/index.js';
|
|
4
4
|
import { endGameSession, endGameSession__legacy } from '../../services/index.js';
|
|
5
|
-
import { getEndGameSessionMutationKey
|
|
5
|
+
import { getEndGameSessionMutationKey } from '../../utils/index.js';
|
|
6
6
|
import { getSession } from '../services/index.js';
|
|
7
7
|
export const useEndGameSessionMutation = (config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
return useMutation({
|
|
10
9
|
...config,
|
|
11
10
|
mutationKey: getEndGameSessionMutationKey(),
|
|
12
11
|
mutationFn: async (input) => {
|
|
13
|
-
const session = await
|
|
14
|
-
queryKey: getSessionQueryKey(),
|
|
15
|
-
queryFn: () => getSession(),
|
|
16
|
-
});
|
|
12
|
+
const session = await getSession();
|
|
17
13
|
invariant(session.status === 'authenticated');
|
|
18
14
|
if (LEGACY_GAME_PROVIDERS.includes(input.game.provider)) {
|
|
19
15
|
await endGameSession__legacy(input.session.id, {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getFavoriteGames } from '../../services/index.js';
|
|
4
|
-
import { getFavoriteGamesQueryKey
|
|
4
|
+
import { getFavoriteGamesQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useFavoriteGamesQuery = (config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
return useQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useFavoriteGamesQuery = (config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getFavoriteGamesQueryKey(),
|
|
16
15
|
queryFn: async ({ signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
const favoriteGames = getFavoriteGames({
|
|
23
19
|
signal,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getInstapayBankList } from '../../services/index.js';
|
|
4
|
-
import { getInstapayBankListQueryKey
|
|
4
|
+
import { getInstapayBankListQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useInstapayBankListQuery = (config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useInstapayBankListQuery = (config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getInstapayBankListQueryKey(),
|
|
16
15
|
queryFn: async ({ signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
const instapayBankList = await getInstapayBankList({
|
|
23
19
|
signal,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { validateMayaSession } from '../../services/index.js';
|
|
4
|
-
import { getIsMayaSessionValidQueryKey
|
|
4
|
+
import { getIsMayaSessionValidQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useOnMMA } from './useOnMMA.js';
|
|
7
7
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
8
8
|
export const useIsMayaSessionValidQuery = (config) => {
|
|
9
9
|
const [onMMA] = useOnMMA();
|
|
10
|
-
const queryClient = getQueryClient();
|
|
11
10
|
const sessionQuery = useSessionQuery();
|
|
12
11
|
const query = useQuery({
|
|
13
12
|
gcTime: 0,
|
|
@@ -23,10 +22,7 @@ export const useIsMayaSessionValidQuery = (config) => {
|
|
|
23
22
|
: sessionQuery.data?.status === 'authenticated',
|
|
24
23
|
queryKey: getIsMayaSessionValidQueryKey(),
|
|
25
24
|
queryFn: async ({ signal }) => {
|
|
26
|
-
const session = await
|
|
27
|
-
queryKey: getSessionQueryKey(),
|
|
28
|
-
queryFn: () => getSession(),
|
|
29
|
-
});
|
|
25
|
+
const session = await getSession({ signal });
|
|
30
26
|
invariant(session.status === 'authenticated');
|
|
31
27
|
try {
|
|
32
28
|
await validateMayaSession({
|
|
@@ -2,17 +2,14 @@ import { useMutation } from '@tanstack/react-query';
|
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getSession } from '../../client/services/index.js';
|
|
4
4
|
import { markGameAsFavorite } from '../../services/index.js';
|
|
5
|
-
import { getFavoriteGamesQueryKey, getGamesQueryKey, getMarkGameAsFavoriteMutationKey, getQueryClient,
|
|
5
|
+
import { getFavoriteGamesQueryKey, getGamesQueryKey, getMarkGameAsFavoriteMutationKey, getQueryClient, } from '../../utils/index.js';
|
|
6
6
|
export const useMarkGameAsFavoriteMutation = (config) => {
|
|
7
7
|
const queryClient = getQueryClient();
|
|
8
8
|
const mutation = useMutation({
|
|
9
9
|
...config,
|
|
10
10
|
mutationKey: getMarkGameAsFavoriteMutationKey(),
|
|
11
11
|
mutationFn: async (id) => {
|
|
12
|
-
const session = await
|
|
13
|
-
queryKey: getSessionQueryKey(),
|
|
14
|
-
queryFn: () => getSession(),
|
|
15
|
-
});
|
|
12
|
+
const session = await getSession();
|
|
16
13
|
invariant(session.status === 'authenticated');
|
|
17
14
|
await markGameAsFavorite(id, {
|
|
18
15
|
headers: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { markMessageAsRead } from '../../services/index.js';
|
|
4
|
-
import { getMarkMessageAsReadMutationKey, getMessagesQueryKey, getQueryClient,
|
|
4
|
+
import { getMarkMessageAsReadMutationKey, getMessagesQueryKey, getQueryClient, getUnreadMessagesCountQueryKey, } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
export const useMarkMessageAsReadMutation = (config) => {
|
|
7
7
|
const queryClient = getQueryClient();
|
|
@@ -9,10 +9,7 @@ export const useMarkMessageAsReadMutation = (config) => {
|
|
|
9
9
|
...config,
|
|
10
10
|
mutationKey: getMarkMessageAsReadMutationKey(),
|
|
11
11
|
mutationFn: async (id) => {
|
|
12
|
-
const session = await
|
|
13
|
-
queryKey: getSessionQueryKey(),
|
|
14
|
-
queryFn: () => getSession(),
|
|
15
|
-
});
|
|
12
|
+
const session = await getSession();
|
|
16
13
|
invariant(session.status === 'authenticated');
|
|
17
14
|
await markMessageAsRead(id, {
|
|
18
15
|
headers: {
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getMemberVerification } from '../../services/index.js';
|
|
4
|
-
import { getMemberVerificationQueryKey
|
|
4
|
+
import { getMemberVerificationQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useMemberVerificationQuery = (config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useQuery({
|
|
11
10
|
enabled: sessionQuery.data?.status === 'authenticated',
|
|
12
11
|
...config,
|
|
13
12
|
queryKey: getMemberVerificationQueryKey(),
|
|
14
13
|
queryFn: async ({ signal }) => {
|
|
15
|
-
const session = await
|
|
16
|
-
queryKey: getSessionQueryKey(),
|
|
17
|
-
queryFn: () => getSession(),
|
|
18
|
-
});
|
|
14
|
+
const session = await getSession({ signal });
|
|
19
15
|
invariant(session.status === 'authenticated');
|
|
20
16
|
return await getMemberVerification({
|
|
21
17
|
signal,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useInfiniteQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getMessages } from '../../services/index.js';
|
|
4
|
-
import { getMessagesQueryKey
|
|
4
|
+
import { getMessagesQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useMessagesQuery = (input, config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useInfiniteQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useMessagesQuery = (input, config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getMessagesQueryKey(input),
|
|
16
15
|
queryFn: async ({ pageParam, signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
return getMessages({ ...input, after: pageParam }, {
|
|
23
19
|
signal,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getPaymentSettings } from '../../services/index.js';
|
|
4
|
-
import { getPaymentSettingsQueryKey
|
|
4
|
+
import { getPaymentSettingsQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const usePaymentSettingsQuery = (config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const usePaymentSettingsQuery = (config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getPaymentSettingsQueryKey(),
|
|
16
15
|
queryFn: async ({ signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
return await getPaymentSettings({
|
|
23
19
|
signal,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getProfileCompletion } from '../../services/index.js';
|
|
4
|
-
import { getProfileCompletionQueryKey
|
|
4
|
+
import { getProfileCompletionQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useProfileCompletionQuery = (config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useProfileCompletionQuery = (config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getProfileCompletionQueryKey(),
|
|
16
15
|
queryFn: async ({ signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
return await getProfileCompletion({
|
|
23
19
|
signal,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useInfiniteQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getTransactionRecords, } from '../../services/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getTransactionRecordsQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useTransactionRecordsQuery = (input, config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useInfiniteQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useTransactionRecordsQuery = (input, config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getTransactionRecordsQueryKey(input),
|
|
16
15
|
queryFn: async ({ pageParam, signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
return getTransactionRecords({ ...input, after: pageParam }, {
|
|
23
19
|
signal,
|
|
@@ -2,17 +2,14 @@ import { useMutation } from '@tanstack/react-query';
|
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getSession } from '../../client/services/index.js';
|
|
4
4
|
import { unmarkGameAsFavorite } from '../../services/index.js';
|
|
5
|
-
import { getFavoriteGamesQueryKey, getGamesQueryKey, getQueryClient,
|
|
5
|
+
import { getFavoriteGamesQueryKey, getGamesQueryKey, getQueryClient, getUnmarkGameAsFavoriteMutationKey, } from '../../utils/index.js';
|
|
6
6
|
export const useUnmarkGameAsFavoriteMutation = (config) => {
|
|
7
7
|
const queryClient = getQueryClient();
|
|
8
8
|
const mutation = useMutation({
|
|
9
9
|
...config,
|
|
10
10
|
mutationKey: getUnmarkGameAsFavoriteMutationKey(),
|
|
11
11
|
mutationFn: async (id) => {
|
|
12
|
-
const session = await
|
|
13
|
-
queryKey: getSessionQueryKey(),
|
|
14
|
-
queryFn: () => getSession(),
|
|
15
|
-
});
|
|
12
|
+
const session = await getSession();
|
|
16
13
|
invariant(session.status === 'authenticated');
|
|
17
14
|
await unmarkGameAsFavorite(id, {
|
|
18
15
|
headers: {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getUnreadMessagesCount, } from '../../services/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getUnreadMessagesCountQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useUnreadMessagesCountQuery = (input, config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useUnreadMessagesCountQuery = (input, config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getUnreadMessagesCountQueryKey(input),
|
|
16
15
|
queryFn: async ({ signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession();
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
return await getUnreadMessagesCount(input, {
|
|
23
19
|
signal,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { updateMemberAccount, } from '../../services/index.js';
|
|
4
|
-
import { getAccountQueryKey, getProfileCompletionQueryKey, getQueryClient,
|
|
4
|
+
import { getAccountQueryKey, getProfileCompletionQueryKey, getQueryClient, getUpdateAccountMutationKey, } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useAccountQuery } from './useAccountQuery.js';
|
|
7
7
|
export const useUpdateAccountMutation = (config) => {
|
|
@@ -11,10 +11,7 @@ export const useUpdateAccountMutation = (config) => {
|
|
|
11
11
|
...config,
|
|
12
12
|
mutationKey: getUpdateAccountMutationKey(),
|
|
13
13
|
mutationFn: async (input) => {
|
|
14
|
-
const session = await
|
|
15
|
-
queryKey: getSessionQueryKey(),
|
|
16
|
-
queryFn: () => getSession(),
|
|
17
|
-
});
|
|
14
|
+
const session = await getSession();
|
|
18
15
|
invariant(session.status === 'authenticated');
|
|
19
16
|
invariant(accountQuery.data);
|
|
20
17
|
await updateMemberAccount(accountQuery.data.id, input, {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getWallet } from '../../services/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getWalletQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useWalletQuery = (config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
return useQuery({
|
|
11
10
|
...config,
|
|
@@ -14,12 +13,14 @@ export const useWalletQuery = (config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getWalletQueryKey(),
|
|
16
15
|
queryFn: async ({ signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession({ signal });
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
|
-
const wallet = await getWallet({
|
|
18
|
+
const wallet = await getWallet({
|
|
19
|
+
signal,
|
|
20
|
+
headers: {
|
|
21
|
+
Authorization: `Bearer ${session.token}`,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
23
24
|
return wallet ?? null;
|
|
24
25
|
},
|
|
25
26
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useInfiniteQuery } from '@tanstack/react-query';
|
|
2
2
|
import invariant from 'tiny-invariant';
|
|
3
3
|
import { getWithdrawalRecords, } from '../../services/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getWithdrawalRecordsQueryKey } from '../../utils/index.js';
|
|
5
5
|
import { getSession } from '../services/index.js';
|
|
6
6
|
import { useSessionQuery } from './useSessionQuery.js';
|
|
7
7
|
export const useWithdrawalRecordsQuery = (input, config) => {
|
|
8
|
-
const queryClient = getQueryClient();
|
|
9
8
|
const sessionQuery = useSessionQuery();
|
|
10
9
|
const query = useInfiniteQuery({
|
|
11
10
|
...config,
|
|
@@ -14,10 +13,7 @@ export const useWithdrawalRecordsQuery = (input, config) => {
|
|
|
14
13
|
: sessionQuery.data?.status === 'authenticated',
|
|
15
14
|
queryKey: getWithdrawalRecordsQueryKey(input),
|
|
16
15
|
queryFn: async ({ pageParam, signal }) => {
|
|
17
|
-
const session = await
|
|
18
|
-
queryKey: getSessionQueryKey(),
|
|
19
|
-
queryFn: () => getSession(),
|
|
20
|
-
});
|
|
16
|
+
const session = await getSession();
|
|
21
17
|
invariant(session.status === 'authenticated');
|
|
22
18
|
return await getWithdrawalRecords({ ...input, after: pageParam }, {
|
|
23
19
|
signal,
|
|
@@ -6,9 +6,9 @@ import Link from 'next/link';
|
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { useShallow } from 'zustand/shallow';
|
|
8
8
|
import { useAccountQuery, useGlobalStore, useLocaleInfo, useSignOutMutation, useUnreadMessagesCountQuery, useWalletQuery, } from '../../client/hooks/index.js';
|
|
9
|
-
import { AlertCircleIcon, Bell01Icon, ChevronRightIcon, CoinsStacked02Icon, CoinsSwap02Icon, Gift01Icon, Logout01Icon, Settings02Icon,
|
|
9
|
+
import { AlertCircleIcon, Bell01Icon, ChevronRightIcon, CoinsStacked02Icon, CoinsSwap02Icon, Gift01Icon, Logout01Icon, Settings02Icon, } from '../../icons/index.js';
|
|
10
10
|
import avatarPlaceholder from '../../images/placeholder-avatar.png';
|
|
11
|
-
import { Badge, Button, Drawer,
|
|
11
|
+
import { Badge, Button, Drawer, Popover } from '../../ui/index.js';
|
|
12
12
|
import { formatNumber, parseDecimal } from '../../utils/index.js';
|
|
13
13
|
import { accountRecipe } from './account.recipe.js';
|
|
14
14
|
const recipe = accountRecipe();
|
|
@@ -25,17 +25,19 @@ export function Account(props) {
|
|
|
25
25
|
const [mobileOffsetTop, desktopOffsetTop] = Array.isArray(props.offsetTop)
|
|
26
26
|
? props.offsetTop
|
|
27
27
|
: [props.offsetTop ?? '0px', props.offsetTop ?? '0px'];
|
|
28
|
-
return (_jsxs(_Fragment, { children: [
|
|
28
|
+
return (_jsxs(_Fragment, { children: [_jsx(Drawer.Root, { open: globalStore.account__mobile.open, onOpenChange: (details) => {
|
|
29
29
|
globalStore.account__mobile.setOpen(details.open);
|
|
30
|
-
}, lazyMount: true, unmountOnExit: true, children:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
}, lazyMount: true, unmountOnExit: true, children: _jsx(Portal, { children: _jsx(Drawer.Positioner, { children: _jsxs(Drawer.Content, { className: twMerge('relative', 'flex', 'flex-col', 'top-[var(--offset-top-mobile)]', 'h-[calc(100%-var(--offset-top-mobile))]', 'w-full', 'px-xl', 'py-6', 'lg:top-[var(--offset-top-desktop)]', 'lg:h-[calc(100%-var(--offset-top-desktop))]'), style: {
|
|
31
|
+
['--offset-top-mobile']: mobileOffsetTop,
|
|
32
|
+
['--offset-top-desktop']: desktopOffsetTop,
|
|
33
|
+
}, children: [_jsx(Profile, {}), _jsx(Wallet, {}), _jsx(Links, { rewardsUrl: rewardsUrl, betRecordsUrl: betRecordsUrl, transactionsUrl: transactionsUrl, accountSettingsUrl: accountSettingsUrl, shouldShowSettings: shouldShowSettings })] }) }) }) }), _jsx(Popover.Root, { open: globalStore.account.open, onOpenChange: (details) => {
|
|
34
34
|
globalStore.account.setOpen(details.open);
|
|
35
35
|
}, lazyMount: true, unmountOnExit: true, positioning: {
|
|
36
36
|
placement: 'bottom',
|
|
37
37
|
strategy: 'fixed',
|
|
38
|
-
},
|
|
38
|
+
}, ids: {
|
|
39
|
+
trigger: 'opexa-portal-components:account-trigger',
|
|
40
|
+
}, children: _jsx(Portal, { children: _jsx(Popover.Positioner, { children: _jsxs(Popover.Content, { className: "border-border-primary bg-bg-primary relative z-popover w-[23.438rem] overflow-hidden rounded-xl border p-xl ui-open:animate-fade-in ui-closed:animate-fade-out", children: [_jsx(Profile, {}), _jsx(Wallet, {}), _jsx(Links, { rewardsUrl: rewardsUrl, betRecordsUrl: betRecordsUrl, transactionsUrl: transactionsUrl, accountSettingsUrl: accountSettingsUrl, shouldShowSettings: shouldShowSettings })] }) }) }) })] }));
|
|
39
41
|
}
|
|
40
42
|
function Profile() {
|
|
41
43
|
const accountQuery = useAccountQuery();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
2
|
export interface AccountTriggerProps extends ComponentPropsWithRef<'button'> {
|
|
3
|
-
mobile?: boolean;
|
|
4
3
|
asChild?: boolean;
|
|
5
4
|
}
|
|
6
|
-
export declare function AccountTrigger(props: AccountTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function AccountTrigger({ asChild, children, ...props }: AccountTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ark } from '@ark-ui/react';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import { useMediaQuery } from 'usehooks-ts';
|
|
4
6
|
import { useShallow } from 'zustand/shallow';
|
|
5
7
|
import { useGlobalStore } from '../../client/hooks/index.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import avatarPlaceholder from '../../images/placeholder-avatar.png';
|
|
9
|
+
import { IconButton } from '../../ui/index.js';
|
|
10
|
+
export function AccountTrigger({ asChild, children, ...props }) {
|
|
11
|
+
const desktop = useMediaQuery('(min-width: 1024px)', {
|
|
12
|
+
defaultValue: true,
|
|
13
|
+
});
|
|
14
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
15
|
+
account: ctx.account,
|
|
16
|
+
account__mobile: ctx.account__mobile,
|
|
17
|
+
})));
|
|
18
|
+
const disclosure = desktop
|
|
19
|
+
? globalStore.account
|
|
20
|
+
: globalStore.account__mobile;
|
|
21
|
+
return (_jsx(ark.button, { type: "button", "aria-label": "Toggle account menu", "data-open": disclosure.open ? 'open' : 'closed', ...props, onClick: (e) => {
|
|
22
|
+
disclosure.setOpen(!disclosure.open);
|
|
11
23
|
return props.onClick?.(e);
|
|
12
|
-
} }));
|
|
24
|
+
}, asChild: !children ? true : asChild, children: children ?? (_jsx(IconButton, { id: "opexa-portal-components:account-trigger", size: "sm", colorScheme: "gray", children: _jsx(Image, { src: avatarPlaceholder, alt: "", width: 64, height: 64, className: "size-10" }) })) }));
|
|
13
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
2
|
interface BonusesTriggerProps extends ComponentPropsWithRef<'a'> {
|
|
3
3
|
}
|
|
4
|
-
export declare function BonusesTrigger(props: BonusesTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function BonusesTrigger({ children, className, ...props }: BonusesTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -5,7 +5,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
5
5
|
import { useBonusesQuery, useCashbackBonusesQuery } from '../../client/hooks/index.js';
|
|
6
6
|
import { Gift01Icon } from '../../icons/index.js';
|
|
7
7
|
import { iconButtonRecipe } from '../../ui/IconButton/iconButton.recipe.js';
|
|
8
|
-
export function BonusesTrigger(props) {
|
|
8
|
+
export function BonusesTrigger({ children, className, ...props }) {
|
|
9
9
|
const bonusesQuery = useBonusesQuery({
|
|
10
10
|
refetchInterval: 10000,
|
|
11
11
|
});
|
|
@@ -18,6 +18,6 @@ export function BonusesTrigger(props) {
|
|
|
18
18
|
return (_jsx(Link, { "aria-label": "View Rewards", "data-count": totalCount, ...props, href: props.href ?? '/rewards', className: iconButtonRecipe({
|
|
19
19
|
size: 'sm',
|
|
20
20
|
colorScheme: 'gray',
|
|
21
|
-
className: twMerge('relative',
|
|
22
|
-
}), children:
|
|
21
|
+
className: twMerge('relative', className),
|
|
22
|
+
}), children: children ?? (_jsxs(_Fragment, { children: [totalCount > 0 && (_jsx("div", { className: "bg-brand-500 leading-4.5 text-button-primary-fg absolute -right-1.5 -top-1.5 min-w-5 rounded-full border px-1.5 text-2xs font-semibold", children: totalCount })), _jsx(Gift01Icon, {})] })) }));
|
|
23
23
|
}
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const OnlineBankDepositContext: import("react").Context<{
|
|
2
|
-
view: "
|
|
2
|
+
view: "vca" | "form";
|
|
3
3
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
4
4
|
verify: () => void;
|
|
5
5
|
reset: () => void;
|
|
@@ -9,7 +9,7 @@ export declare const OnlineBankDepositContext: import("react").Context<{
|
|
|
9
9
|
promo?: string | null;
|
|
10
10
|
}) => void;
|
|
11
11
|
}>, useOnlineBankDepositContext: () => {
|
|
12
|
-
view: "
|
|
12
|
+
view: "vca" | "form";
|
|
13
13
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
14
14
|
verify: () => void;
|
|
15
15
|
reset: () => void;
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Deposit } from '../../../../types';
|
|
2
2
|
export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
|
|
3
3
|
export declare function useOnlineBankDeposit(): {
|
|
4
|
-
view: "
|
|
4
|
+
view: "vca" | "form";
|
|
5
5
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
6
|
verify: () => void;
|
|
7
7
|
reset: () => void;
|