@opexa/portal-components 0.0.161 → 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.
Files changed (74) hide show
  1. package/dist/client/utils/createContext.d.ts +2 -2
  2. package/dist/server/utils/prefetchAccountQuery.js +3 -2
  3. package/dist/server/utils/prefetchAvailablePromosQuery.js +3 -2
  4. package/dist/server/utils/prefetchAvailableQuestsCountQuery.js +3 -2
  5. package/dist/server/utils/prefetchAvailableQuestsQuery.js +3 -2
  6. package/dist/server/utils/prefetchBetRecordsQuery.js +3 -2
  7. package/dist/server/utils/prefetchBonusQuery.js +3 -2
  8. package/dist/server/utils/prefetchBonusesCountQuery.js +3 -2
  9. package/dist/server/utils/prefetchBonusesQuery.js +3 -2
  10. package/dist/server/utils/prefetchCashbackBonusQuery.js +3 -2
  11. package/dist/server/utils/prefetchCashbackBonusesCountQuery.js +3 -2
  12. package/dist/server/utils/prefetchCashbackBonusesQuery.js +3 -2
  13. package/dist/server/utils/prefetchCashbackQuery.js +3 -2
  14. package/dist/server/utils/prefetchCashbacksQuery.js +3 -2
  15. package/dist/server/utils/prefetchDepositQuery.js +3 -2
  16. package/dist/server/utils/prefetchDepositRecordsQuery.js +3 -2
  17. package/dist/server/utils/prefetchDepositsCountQuery.js +3 -2
  18. package/dist/server/utils/prefetchFavoriteGamesQuery.js +3 -2
  19. package/dist/server/utils/prefetchFileQuery.js +3 -2
  20. package/dist/server/utils/prefetchGamesQuery.js +3 -2
  21. package/dist/server/utils/prefetchInstapayBankListQuery.js +3 -2
  22. package/dist/server/utils/prefetchIsMayaSessionValidQuery.js +3 -2
  23. package/dist/server/utils/prefetchJackpotsCountQuery.js +3 -2
  24. package/dist/server/utils/prefetchJackpotsQuery.js +3 -2
  25. package/dist/server/utils/prefetchMemberVerificationQuery.js +3 -2
  26. package/dist/server/utils/prefetchOnboardingStatusQuery.js +3 -2
  27. package/dist/server/utils/prefetchPaymentSettingsQuery.js +3 -2
  28. package/dist/server/utils/prefetchPlatformQuery.d.ts +1 -1
  29. package/dist/server/utils/prefetchPlatformQuery.js +3 -2
  30. package/dist/server/utils/prefetchProfileCompletionQuery.js +3 -2
  31. package/dist/server/utils/prefetchPromoQuery.js +3 -2
  32. package/dist/server/utils/prefetchPromosQuery.js +3 -2
  33. package/dist/server/utils/prefetchRecommendedGamesQuery.js +3 -2
  34. package/dist/server/utils/prefetchSessionQuery.d.ts +1 -1
  35. package/dist/server/utils/prefetchSessionQuery.js +3 -2
  36. package/dist/server/utils/prefetchSiteQuery.js +3 -2
  37. package/dist/server/utils/prefetchTopWinsQuery.js +3 -2
  38. package/dist/server/utils/prefetchTournamentsCountQuery.js +3 -2
  39. package/dist/server/utils/prefetchTournamentsQuery.js +3 -2
  40. package/dist/server/utils/prefetchTransactionRecordsQuery.js +3 -2
  41. package/dist/server/utils/prefetchUnreadMessagesCountQuery.js +3 -2
  42. package/dist/server/utils/prefetchWalletQuery.js +3 -2
  43. package/dist/server/utils/prefetchWithdrawalRecordsQuery.js +3 -2
  44. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  45. package/dist/ui/Avatar/Avatar.d.ts +9 -9
  46. package/dist/ui/Badge/Badge.d.ts +12 -12
  47. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  48. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  49. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  50. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  51. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  52. package/dist/ui/Dialog/Dialog.d.ts +88 -88
  53. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  54. package/dist/ui/Field/Field.d.ts +21 -21
  55. package/dist/ui/Menu/Menu.d.ts +90 -90
  56. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  57. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  58. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  59. package/dist/ui/Popover/Popover.d.ts +88 -88
  60. package/dist/ui/Progress/Progress.d.ts +27 -27
  61. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  62. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  63. package/dist/ui/Select/Select.d.ts +45 -45
  64. package/dist/ui/Table/Table.d.ts +21 -21
  65. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  66. package/dist/utils/capitalize.d.ts +1 -2
  67. package/dist/utils/capitalize.js +3 -1
  68. package/dist/utils/createPoll.d.ts +1 -2
  69. package/dist/utils/createSplitProps.d.ts +1 -1
  70. package/dist/utils/createSplitProps.js +3 -2
  71. package/dist/utils/mask.d.ts +2 -3
  72. package/dist/utils/mask.js +3 -2
  73. package/dist/utils/onMobileDevice.d.ts +1 -2
  74. package/package.json +1 -1
@@ -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 function prefetchPlatformQuery(): Promise<void>;
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 async function prefetchPlatformQuery() {
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
+ });
@@ -1,8 +1,9 @@
1
+ import { cache } from 'react';
1
2
  import { getPromo } from '../../services/wallet.js';
2
3
  import { getQueryClient } from '../../utils/getQueryClient.js';
3
4
  import { log } from '../../utils/log.js';
4
5
  import { getPromoQueryKey } from '../../utils/queryKeys.js';
5
- export const prefetchPromoQuery = async (id) => {
6
+ export const prefetchPromoQuery = cache(async (id) => {
6
7
  await getQueryClient()
7
8
  .prefetchQuery({
8
9
  queryKey: getPromoQueryKey(id),
@@ -12,4 +13,4 @@ export const prefetchPromoQuery = async (id) => {
12
13
  },
13
14
  })
14
15
  .catch(() => log.text("'prefetchPromoQuery' failed", 'error'));
15
- };
16
+ });
@@ -1,8 +1,9 @@
1
+ import { cache } from 'react';
1
2
  import { getPromos } from '../../services/wallet.js';
2
3
  import { getQueryClient } from '../../utils/getQueryClient.js';
3
4
  import { log } from '../../utils/log.js';
4
5
  import { getPromosQueryKey } from '../../utils/queryKeys.js';
5
- export const prefetchPromosQuery = async () => {
6
+ export const prefetchPromosQuery = cache(async () => {
6
7
  await getQueryClient()
7
8
  .prefetchQuery({
8
9
  queryKey: getPromosQueryKey(),
@@ -11,4 +12,4 @@ export const prefetchPromosQuery = async () => {
11
12
  },
12
13
  })
13
14
  .catch(() => log.text("'prefetchPromosQuery' failed", 'error'));
14
- };
15
+ });
@@ -1,9 +1,10 @@
1
+ import { cache } from 'react';
1
2
  import { getRecommendedGames } from '../../services/portal.js';
2
3
  import { getQueryClient } from '../../utils/getQueryClient.js';
3
4
  import { log } from '../../utils/log.js';
4
5
  import { getRecommendedGamesQueryKey } from '../../utils/queryKeys.js';
5
6
  import { getSession } from '../services/getSession.js';
6
- export const prefetchRecommendedGamesQuery = async () => {
7
+ export const prefetchRecommendedGamesQuery = cache(async () => {
7
8
  const session = await getSession();
8
9
  if (session.status === 'unauthenticated')
9
10
  return;
@@ -20,4 +21,4 @@ export const prefetchRecommendedGamesQuery = async () => {
20
21
  },
21
22
  })
22
23
  .catch(() => log.text("'prefetchRecommendedGamesQuery' failed", 'error'));
23
- };
24
+ });
@@ -1 +1 @@
1
- export declare function prefetchSessionQuery(): Promise<void>;
1
+ export declare const prefetchSessionQuery: () => Promise<void>;
@@ -1,8 +1,9 @@
1
+ import { cache } from 'react';
1
2
  import { getQueryClient } from '../../utils/getQueryClient.js';
2
3
  import { log } from '../../utils/log.js';
3
4
  import { getSessionQueryKey } from '../../utils/queryKeys.js';
4
5
  import { getSession } from '../services/getSession.js';
5
- export async function prefetchSessionQuery() {
6
+ export const prefetchSessionQuery = cache(async () => {
6
7
  await getQueryClient()
7
8
  .prefetchQuery({
8
9
  queryKey: getSessionQueryKey(),
@@ -11,4 +12,4 @@ export async function prefetchSessionQuery() {
11
12
  },
12
13
  })
13
14
  .catch(() => log.text("'prefetchSessionQuery' failed", 'error'));
14
- }
15
+ });
@@ -1,8 +1,9 @@
1
+ import { cache } from 'react';
1
2
  import { getSite } from '../../services/cmsPortal.js';
2
3
  import { getQueryClient } from '../../utils/getQueryClient.js';
3
4
  import { log } from '../../utils/log.js';
4
5
  import { getSiteQueryKey } from '../../utils/queryKeys.js';
5
- export const prefetchSiteQuery = async () => {
6
+ export const prefetchSiteQuery = cache(async () => {
6
7
  await getQueryClient()
7
8
  .prefetchQuery({
8
9
  queryKey: getSiteQueryKey(),
@@ -11,4 +12,4 @@ export const prefetchSiteQuery = async () => {
11
12
  },
12
13
  })
13
14
  .catch(() => log.text("'prefetchSiteQuery' failed", 'error'));
14
- };
15
+ });