@opexa/portal-components 0.0.160 → 0.0.162
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/useGlobalStore.d.ts +17 -21
- package/dist/client/hooks/useGlobalStore.js +24 -3
- package/dist/client/utils/createContext.d.ts +2 -2
- package/dist/server/utils/prefetchAccountQuery.js +3 -2
- package/dist/server/utils/prefetchAvailablePromosQuery.js +3 -2
- package/dist/server/utils/prefetchAvailableQuestsCountQuery.js +3 -2
- package/dist/server/utils/prefetchAvailableQuestsQuery.js +3 -2
- package/dist/server/utils/prefetchBetRecordsQuery.js +3 -2
- package/dist/server/utils/prefetchBonusQuery.js +3 -2
- package/dist/server/utils/prefetchBonusesCountQuery.js +3 -2
- package/dist/server/utils/prefetchBonusesQuery.js +3 -2
- package/dist/server/utils/prefetchCashbackBonusQuery.js +3 -2
- package/dist/server/utils/prefetchCashbackBonusesCountQuery.js +3 -2
- package/dist/server/utils/prefetchCashbackBonusesQuery.js +3 -2
- package/dist/server/utils/prefetchCashbackQuery.js +3 -2
- package/dist/server/utils/prefetchCashbacksQuery.js +3 -2
- package/dist/server/utils/prefetchDepositQuery.js +3 -2
- package/dist/server/utils/prefetchDepositRecordsQuery.js +3 -2
- package/dist/server/utils/prefetchDepositsCountQuery.js +3 -2
- package/dist/server/utils/prefetchFavoriteGamesQuery.js +3 -2
- package/dist/server/utils/prefetchFileQuery.js +3 -2
- package/dist/server/utils/prefetchGamesQuery.js +3 -2
- package/dist/server/utils/prefetchInstapayBankListQuery.js +3 -2
- package/dist/server/utils/prefetchIsMayaSessionValidQuery.js +3 -2
- package/dist/server/utils/prefetchJackpotsCountQuery.js +3 -2
- package/dist/server/utils/prefetchJackpotsQuery.js +3 -2
- package/dist/server/utils/prefetchMemberVerificationQuery.js +3 -2
- package/dist/server/utils/prefetchOnboardingStatusQuery.js +3 -2
- package/dist/server/utils/prefetchPaymentSettingsQuery.js +3 -2
- package/dist/server/utils/prefetchPlatformQuery.d.ts +1 -1
- package/dist/server/utils/prefetchPlatformQuery.js +3 -2
- package/dist/server/utils/prefetchProfileCompletionQuery.js +3 -2
- package/dist/server/utils/prefetchPromoQuery.js +3 -2
- package/dist/server/utils/prefetchPromosQuery.js +3 -2
- package/dist/server/utils/prefetchRecommendedGamesQuery.js +3 -2
- package/dist/server/utils/prefetchSessionQuery.d.ts +1 -1
- package/dist/server/utils/prefetchSessionQuery.js +3 -2
- package/dist/server/utils/prefetchSiteQuery.js +3 -2
- package/dist/server/utils/prefetchTopWinsQuery.js +3 -2
- package/dist/server/utils/prefetchTournamentsCountQuery.js +3 -2
- package/dist/server/utils/prefetchTournamentsQuery.js +3 -2
- package/dist/server/utils/prefetchTransactionRecordsQuery.js +3 -2
- package/dist/server/utils/prefetchUnreadMessagesCountQuery.js +3 -2
- package/dist/server/utils/prefetchWalletQuery.js +3 -2
- package/dist/server/utils/prefetchWithdrawalRecordsQuery.js +3 -2
- package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
- package/dist/ui/Avatar/Avatar.d.ts +9 -9
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/Dialog/Dialog.d.ts +88 -88
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Menu/Menu.d.ts +90 -90
- package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PinInput/PinInput.d.ts +12 -12
- package/dist/ui/Popover/Popover.d.ts +88 -88
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/utils/capitalize.d.ts +1 -2
- package/dist/utils/capitalize.js +3 -1
- package/dist/utils/createPoll.d.ts +1 -2
- package/dist/utils/createSplitProps.d.ts +1 -1
- package/dist/utils/createSplitProps.js +3 -2
- package/dist/utils/mask.d.ts +2 -3
- package/dist/utils/mask.js +3 -2
- package/dist/utils/onMobileDevice.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import type { FavoriteGame, Game, GameSession, Message } from '../../types';
|
|
2
|
-
interface PopupStore {
|
|
2
|
+
export interface PopupStore {
|
|
3
3
|
open: boolean;
|
|
4
4
|
setOpen: (open: boolean) => void;
|
|
5
5
|
'~touched': boolean;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
collapsed: boolean;
|
|
9
|
-
setCollapsed: (collapsed: boolean) => void;
|
|
10
|
-
'~touched': boolean;
|
|
11
|
-
}
|
|
12
|
-
type GameLaunchDetails = {
|
|
7
|
+
export type GameLaunchStore__Details = {
|
|
13
8
|
status: 'WAITING';
|
|
14
9
|
game?: null;
|
|
15
10
|
session?: null;
|
|
@@ -26,28 +21,28 @@ type GameLaunchDetails = {
|
|
|
26
21
|
game: Game | FavoriteGame;
|
|
27
22
|
session?: null;
|
|
28
23
|
};
|
|
29
|
-
interface GameLaunchStore {
|
|
30
|
-
details:
|
|
31
|
-
setDetails: (details:
|
|
24
|
+
export interface GameLaunchStore {
|
|
25
|
+
details: GameLaunchStore__Details;
|
|
26
|
+
setDetails: (details: GameLaunchStore__Details) => void;
|
|
32
27
|
'~touched': boolean;
|
|
33
28
|
}
|
|
34
|
-
interface SearchStore extends PopupStore {
|
|
29
|
+
export interface SearchStore extends PopupStore {
|
|
35
30
|
}
|
|
36
|
-
type
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
tab:
|
|
40
|
-
setTab: (tab: MessagesTab) => void;
|
|
31
|
+
export type MessagesStore__Tab = 'ALL' | 'UNREAD';
|
|
32
|
+
export interface MessagesStore extends PopupStore {
|
|
33
|
+
tab: MessagesStore__Tab;
|
|
34
|
+
setTab: (tab: MessagesStore__Tab) => void;
|
|
41
35
|
}
|
|
42
|
-
interface MessageStore extends PopupStore {
|
|
36
|
+
export interface MessageStore extends PopupStore {
|
|
43
37
|
open: boolean;
|
|
44
38
|
setOpen: (open: boolean) => void;
|
|
45
39
|
data: Message | null;
|
|
46
40
|
setData: (data: Message | null) => void;
|
|
47
41
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
export type DepositWithdrawalStore__Tab = 'DEPOSIT' | 'WITHDRAWAL';
|
|
43
|
+
export interface DepositWithdrawalStore extends PopupStore {
|
|
44
|
+
tab: DepositWithdrawalStore__Tab;
|
|
45
|
+
setTab: (tab: DepositWithdrawalStore__Tab) => void;
|
|
51
46
|
promo: string | null;
|
|
52
47
|
setPromo: (promo: string | null) => void;
|
|
53
48
|
}
|
|
@@ -63,7 +58,8 @@ interface GlobalStore {
|
|
|
63
58
|
account__mobile: PopupStore;
|
|
64
59
|
messages: MessagesStore;
|
|
65
60
|
message: MessageStore;
|
|
66
|
-
sidebar:
|
|
61
|
+
sidebar: PopupStore;
|
|
62
|
+
sidebar__mobile: PopupStore;
|
|
67
63
|
kyc: PopupStore;
|
|
68
64
|
spotBonus: PopupStore;
|
|
69
65
|
}
|
|
@@ -196,12 +196,33 @@ export const useGlobalStore = create((set) => ({
|
|
|
196
196
|
'~touched': false,
|
|
197
197
|
},
|
|
198
198
|
sidebar: {
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
open: true,
|
|
200
|
+
setOpen(open) {
|
|
201
|
+
set((prev) => ({
|
|
202
|
+
sidebar: {
|
|
203
|
+
...prev.sidebar,
|
|
204
|
+
open,
|
|
205
|
+
'~touched': true,
|
|
206
|
+
},
|
|
207
|
+
sidebar__mobile: {
|
|
208
|
+
...prev.sidebar__mobile,
|
|
209
|
+
'~touched': true,
|
|
210
|
+
},
|
|
211
|
+
}));
|
|
212
|
+
},
|
|
213
|
+
'~touched': false,
|
|
214
|
+
},
|
|
215
|
+
sidebar__mobile: {
|
|
216
|
+
open: false,
|
|
217
|
+
setOpen(open) {
|
|
201
218
|
set((prev) => ({
|
|
219
|
+
sidebar__mobile: {
|
|
220
|
+
...prev.sidebar__mobile,
|
|
221
|
+
open,
|
|
222
|
+
'~touched': true,
|
|
223
|
+
},
|
|
202
224
|
sidebar: {
|
|
203
225
|
...prev.sidebar,
|
|
204
|
-
collapsed,
|
|
205
226
|
'~touched': true,
|
|
206
227
|
},
|
|
207
228
|
}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
interface CreateContextOptions<T, S extends boolean> {
|
|
2
|
+
export interface CreateContextOptions<T, S extends boolean> {
|
|
3
3
|
strict?: S;
|
|
4
4
|
defaultValue?: T;
|
|
5
5
|
}
|
|
6
6
|
type ProviderProps<T> = React.PropsWithChildren<{
|
|
7
7
|
value: T;
|
|
8
8
|
}>;
|
|
9
|
-
type CreateContextReturn<T, S extends boolean> = [S] extends [true] ? [
|
|
9
|
+
export type CreateContextReturn<T, S extends boolean> = [S] extends [true] ? [
|
|
10
10
|
provider: (props: ProviderProps<T>) => React.ReactNode,
|
|
11
11
|
hook: () => T,
|
|
12
12
|
context: React.Context<T>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getMemberAccount } from '../../services/account.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getAccountQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchAccountQuery = async () => {
|
|
7
|
+
export const prefetchAccountQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchAccountQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchAccountQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getAvailablePromos, } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getAvailablePromosQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchAvailablePromosQuery = async (input) => {
|
|
7
|
+
export const prefetchAvailablePromosQuery = cache(async (input) => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchAvailablePromosQuery = async (input) => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchAvailablePromosQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getAvailableQuestsCount } from '../../services/trigger.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getAvailableQuestsCountQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchAvailableQuestsCountQuery = async () => {
|
|
7
|
+
export const prefetchAvailableQuestsCountQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchAvailableQuestsCountQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchAvailableQuestsCountQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getAvailableQuests } from '../../services/trigger.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getAvailableQuestsQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchAvailableQuestsQuery = async () => {
|
|
7
|
+
export const prefetchAvailableQuestsQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchAvailableQuestsQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchAvailableQuestsQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getBetRecords } from '../../services/report.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getBetRecordsQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchBetRecordsQuery = async (input) => {
|
|
7
|
+
export const prefetchBetRecordsQuery = cache(async (input) => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -21,4 +22,4 @@ export const prefetchBetRecordsQuery = async (input) => {
|
|
|
21
22
|
initialPageParam: undefined,
|
|
22
23
|
})
|
|
23
24
|
.catch(() => log.text("'prefetchBetRecordsQuery' failed", 'error'));
|
|
24
|
-
};
|
|
25
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getBonus } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getBonusQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchBonusQuery = async (id) => {
|
|
7
|
+
export const prefetchBonusQuery = cache(async (id) => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -21,4 +22,4 @@ export const prefetchBonusQuery = async (id) => {
|
|
|
21
22
|
},
|
|
22
23
|
})
|
|
23
24
|
.catch(() => log.text("'prefetchBonusQuery' failed", 'error'));
|
|
24
|
-
};
|
|
25
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getBonusesCount } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getBonusesCountQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchBonusesCountQuery = async () => {
|
|
7
|
+
export const prefetchBonusesCountQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchBonusesCountQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchBonusesCountQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getBonuses } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getBonusesQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchBonusesQuery = async (input) => {
|
|
7
|
+
export const prefetchBonusesQuery = cache(async (input) => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchBonusesQuery = async (input) => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchBonusesQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getCashbackBonus } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getCashbackBonusQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchCashbackBonusQuery = async (id) => {
|
|
7
|
+
export const prefetchCashbackBonusQuery = cache(async (id) => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchCashbackBonusQuery = async (id) => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchCashbackBonusQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getCashbackBonusesCount } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getCashbackBonusesCountQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchCashbackBonusesCountQuery = async () => {
|
|
7
|
+
export const prefetchCashbackBonusesCountQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchCashbackBonusesCountQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchCashbackBonusesCountQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getCashbackBonuses } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getCashbackBonusesQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchCashbackBonusesQuery = async () => {
|
|
7
|
+
export const prefetchCashbackBonusesQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchCashbackBonusesQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchCashbackBonusesQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getCashback } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getCashbackQueryKey } from '../../utils/queryKeys.js';
|
|
5
|
-
export const prefetchCashbackQuery = async (id) => {
|
|
6
|
+
export const prefetchCashbackQuery = cache(async (id) => {
|
|
6
7
|
await getQueryClient()
|
|
7
8
|
.prefetchQuery({
|
|
8
9
|
queryKey: getCashbackQueryKey(id),
|
|
@@ -12,4 +13,4 @@ export const prefetchCashbackQuery = async (id) => {
|
|
|
12
13
|
},
|
|
13
14
|
})
|
|
14
15
|
.catch(() => log.text("'prefetchCashbackQuery' failed", 'error'));
|
|
15
|
-
};
|
|
16
|
+
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getCashbacks } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getCashbacksQueryKey } from '../../utils/queryKeys.js';
|
|
5
|
-
export const prefetchCashbacksQuery = async () => {
|
|
6
|
+
export const prefetchCashbacksQuery = cache(async () => {
|
|
6
7
|
await getQueryClient()
|
|
7
8
|
.prefetchQuery({
|
|
8
9
|
queryKey: getCashbacksQueryKey(),
|
|
@@ -13,4 +14,4 @@ export const prefetchCashbacksQuery = async () => {
|
|
|
13
14
|
},
|
|
14
15
|
})
|
|
15
16
|
.catch(() => log.text("'prefetchCashbacksQuery' failed", 'error'));
|
|
16
|
-
};
|
|
17
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getDeposit } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getDepositQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchDepositQuery = async (id) => {
|
|
7
|
+
export const prefetchDepositQuery = cache(async (id) => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -21,4 +22,4 @@ export const prefetchDepositQuery = async (id) => {
|
|
|
21
22
|
},
|
|
22
23
|
})
|
|
23
24
|
.catch(() => log.text("'prefetchDepositQuery' failed", 'error'));
|
|
24
|
-
};
|
|
25
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getDepositRecords, } from '../../services/report.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getDepositRecordsQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchDepositRecordsQuery = async (input) => {
|
|
7
|
+
export const prefetchDepositRecordsQuery = cache(async (input) => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -21,4 +22,4 @@ export const prefetchDepositRecordsQuery = async (input) => {
|
|
|
21
22
|
initialPageParam: undefined,
|
|
22
23
|
})
|
|
23
24
|
.catch(() => log.text("'prefetchDepositRecordsQuery' failed", 'error'));
|
|
24
|
-
};
|
|
25
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getDepositsCount } from '../../services/report.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getDepositsCountQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchDepositsCountQuery = async () => {
|
|
7
|
+
export const prefetchDepositsCountQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -21,4 +22,4 @@ export const prefetchDepositsCountQuery = async () => {
|
|
|
21
22
|
},
|
|
22
23
|
})
|
|
23
24
|
.catch(() => log.text("'prefetchDepositsCountQuery' failed", 'error'));
|
|
24
|
-
};
|
|
25
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getFavoriteGames } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getFavoriteGamesQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchFavoriteGamesQuery = async () => {
|
|
7
|
+
export const prefetchFavoriteGamesQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -21,4 +22,4 @@ export const prefetchFavoriteGamesQuery = async () => {
|
|
|
21
22
|
},
|
|
22
23
|
})
|
|
23
24
|
.catch(() => log.text("'prefetchFavoriteGamesQuery' failed", 'error'));
|
|
24
|
-
};
|
|
25
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getFile } from '../../services/file.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getFileQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchFileQuery = async (id) => {
|
|
7
|
+
export const prefetchFileQuery = cache(async (id) => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
await getQueryClient()
|
|
9
10
|
.prefetchQuery({
|
|
@@ -20,4 +21,4 @@ export const prefetchFileQuery = async (id) => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchFileQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getGames__next, } from '../../services/cmsPortal.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getGamesQueryKey } from '../../utils/queryKeys.js';
|
|
5
|
-
export const prefetchGamesQuery = async (input) => {
|
|
6
|
+
export const prefetchGamesQuery = cache(async (input) => {
|
|
6
7
|
await getQueryClient()
|
|
7
8
|
.prefetchInfiniteQuery({
|
|
8
9
|
queryKey: getGamesQueryKey(input),
|
|
@@ -15,4 +16,4 @@ export const prefetchGamesQuery = async (input) => {
|
|
|
15
16
|
initialPageParam: undefined,
|
|
16
17
|
})
|
|
17
18
|
.catch(() => log.text("'prefetchGamesQuery' failed", 'error'));
|
|
18
|
-
};
|
|
19
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getInstapayBankList } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getInstapayBankListQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchInstapayBankListQuery = async () => {
|
|
7
|
+
export const prefetchInstapayBankListQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -21,4 +22,4 @@ export const prefetchInstapayBankListQuery = async () => {
|
|
|
21
22
|
},
|
|
22
23
|
})
|
|
23
24
|
.catch(() => log.text("'prefetchInstapayBankListQuery' failed", 'error'));
|
|
24
|
-
};
|
|
25
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { validateMayaSession } from '../../services/wallet.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getIsMayaSessionValidQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchIsMayaSessionValidQuery = async () => {
|
|
7
|
+
export const prefetchIsMayaSessionValidQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -26,4 +27,4 @@ export const prefetchIsMayaSessionValidQuery = async () => {
|
|
|
26
27
|
},
|
|
27
28
|
})
|
|
28
29
|
.catch(() => log.text("'prefetchIsMayaSessionValidQuery' failed", 'error'));
|
|
29
|
-
};
|
|
30
|
+
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getJackpotsCount, } from '../../services/report.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getJackpotsCountQueryKey } from '../../utils/queryKeys.js';
|
|
5
|
-
export const prefetchJackpotsCountQuery = async (input) => {
|
|
6
|
+
export const prefetchJackpotsCountQuery = cache(async (input) => {
|
|
6
7
|
await getQueryClient()
|
|
7
8
|
.prefetchQuery({
|
|
8
9
|
queryKey: getJackpotsCountQueryKey(input),
|
|
@@ -11,4 +12,4 @@ export const prefetchJackpotsCountQuery = async (input) => {
|
|
|
11
12
|
},
|
|
12
13
|
})
|
|
13
14
|
.catch(() => log.text("'prefetchJackpotsCountQuery' failed", 'error'));
|
|
14
|
-
};
|
|
15
|
+
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getJackpots } from '../../services/report.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getJackpotsQueryKey } from '../../utils/queryKeys.js';
|
|
5
|
-
export const prefetchJackpotsQuery = async (input) => {
|
|
6
|
+
export const prefetchJackpotsQuery = cache(async (input) => {
|
|
6
7
|
await getQueryClient()
|
|
7
8
|
.prefetchInfiniteQuery({
|
|
8
9
|
queryKey: getJackpotsQueryKey(input),
|
|
@@ -12,4 +13,4 @@ export const prefetchJackpotsQuery = async (input) => {
|
|
|
12
13
|
initialPageParam: undefined,
|
|
13
14
|
})
|
|
14
15
|
.catch(() => log.text("'prefetchJackpotsQuery' failed", 'error'));
|
|
15
|
-
};
|
|
16
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getMemberVerification } from '../../services/account.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getMemberVerificationQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchMemberVerificationQuery = async () => {
|
|
7
|
+
export const prefetchMemberVerificationQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchMemberVerificationQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchMemberVerificationQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getOnboardingStatus } from '../../services/portal.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getOnboardingStatusQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchOnboardingStatusQuery = async () => {
|
|
7
|
+
export const prefetchOnboardingStatusQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -21,4 +22,4 @@ export const prefetchOnboardingStatusQuery = async () => {
|
|
|
21
22
|
},
|
|
22
23
|
})
|
|
23
24
|
.catch(() => log.text("'prefetchOnboardingStatusQuery' failed", 'error'));
|
|
24
|
-
};
|
|
25
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getPaymentSettings } from '../../services/account.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getPaymentSettingsQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchPaymentSettingsQuery = async () => {
|
|
7
|
+
export const prefetchPaymentSettingsQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchPaymentSettingsQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchPaymentSettingsQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const prefetchPlatformQuery: () => Promise<void>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getPlatform } from '../../services/portal.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getPlatformQueryKey } from '../../utils/queryKeys.js';
|
|
5
|
-
export
|
|
6
|
+
export const prefetchPlatformQuery = cache(async () => {
|
|
6
7
|
await getQueryClient()
|
|
7
8
|
.prefetchQuery({
|
|
8
9
|
queryKey: getPlatformQueryKey(),
|
|
@@ -11,4 +12,4 @@ export async function prefetchPlatformQuery() {
|
|
|
11
12
|
},
|
|
12
13
|
})
|
|
13
14
|
.catch(() => log.text("'prefetchPlatformQuery' failed", 'error'));
|
|
14
|
-
}
|
|
15
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
1
2
|
import { getProfileCompletion } from '../../services/account.js';
|
|
2
3
|
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
3
4
|
import { log } from '../../utils/log.js';
|
|
4
5
|
import { getProfileCompletionQueryKey } from '../../utils/queryKeys.js';
|
|
5
6
|
import { getSession } from '../services/getSession.js';
|
|
6
|
-
export const prefetchProfileCompletionQuery = async () => {
|
|
7
|
+
export const prefetchProfileCompletionQuery = cache(async () => {
|
|
7
8
|
const session = await getSession();
|
|
8
9
|
if (session.status === 'unauthenticated')
|
|
9
10
|
return;
|
|
@@ -20,4 +21,4 @@ export const prefetchProfileCompletionQuery = async () => {
|
|
|
20
21
|
},
|
|
21
22
|
})
|
|
22
23
|
.catch(() => log.text("'prefetchProfileCompletionQuery' failed", 'error'));
|
|
23
|
-
};
|
|
24
|
+
});
|