@opexa/portal-components 0.0.62 → 0.0.64
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/index.d.ts +8 -2
- package/dist/client/hooks/index.js +8 -2
- package/dist/client/hooks/useBonusQuery.d.ts +3 -0
- package/dist/client/hooks/useBonusQuery.js +34 -0
- package/dist/client/hooks/useCashbackBonusQuery.d.ts +3 -0
- package/dist/client/hooks/useCashbackBonusQuery.js +34 -0
- package/dist/client/hooks/useCashbackBonusesQuery.d.ts +3 -0
- package/dist/client/hooks/useCashbackBonusesQuery.js +32 -0
- package/dist/client/hooks/useCashbackQuery.d.ts +3 -0
- package/dist/client/hooks/useCashbackQuery.js +20 -0
- package/dist/client/hooks/useClaimCashbackBonusMutation.d.ts +2 -0
- package/dist/client/hooks/useClaimCashbackBonusMutation.js +28 -0
- package/dist/client/hooks/useClaimSpotBonusMutation.d.ts +2 -0
- package/dist/client/hooks/useClaimSpotBonusMutation.js +28 -0
- package/dist/client/utils/createContext.d.ts +9 -0
- package/dist/client/utils/createContext.js +14 -0
- package/dist/client/utils/index.d.ts +1 -0
- package/dist/client/utils/index.js +1 -0
- package/dist/components/Bonuses/Bonuses.client.d.ts +2 -0
- package/dist/components/Bonuses/Bonuses.client.js +87 -0
- package/dist/components/Bonuses/Bonuses.d.ts +3 -3
- package/dist/components/Bonuses/Bonuses.js +6 -14
- package/dist/components/Bonuses/money-on-hand.png +0 -0
- package/dist/components/Bonuses/piggy-bank.png +0 -0
- package/dist/components/Cashback/Cashback.client.d.ts +1 -1
- package/dist/components/Cashback/Cashback.client.js +21 -3
- package/dist/components/Cashback/Cashback.d.ts +2 -5
- package/dist/components/Cashback/Cashback.js +11 -1
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +2 -0
- package/dist/components/CashbackBonus/CashbackBonus.client.js +9 -0
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +10 -0
- package/dist/components/CashbackBonus/CashbackBonus.js +5 -0
- package/dist/components/CashbackBonus/index.d.ts +1 -0
- package/dist/components/CashbackBonus/index.js +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +1 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js +2 -8
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +1 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.js +2 -8
- package/dist/components/Empty.d.ts +1 -0
- package/dist/components/Empty.js +1 -1
- package/dist/components/Games/GameContext.d.ts +1 -2
- package/dist/components/Games/GameContext.js +2 -8
- package/dist/components/KYC/KYCContext.d.ts +1 -2
- package/dist/components/KYC/KYCContext.js +2 -8
- package/dist/components/Messages/MessageItem.js +3 -2
- package/dist/components/Messages/MessagePopup.js +1 -0
- package/dist/components/Messages/MessageTrigger.d.ts +8 -0
- package/dist/components/Messages/MessageTrigger.js +18 -0
- package/dist/components/Messages/index.d.ts +2 -0
- package/dist/components/Messages/index.js +2 -0
- package/dist/components/PortalProvider/WebVitals.js +2 -2
- package/dist/components/Promo/Promo.client.d.ts +1 -1
- package/dist/components/Promo/Promo.client.js +3 -3
- package/dist/components/Promos/Cashback.d.ts +7 -0
- package/dist/components/Promos/Cashback.js +17 -0
- package/dist/components/Promos/Promo.d.ts +7 -0
- package/dist/components/Promos/Promo.js +17 -0
- package/dist/components/Promos/Promos.d.ts +4 -0
- package/dist/components/Promos/Promos.js +6 -6
- package/dist/components/Promos/PromosCarousel.d.ts +2 -0
- package/dist/components/Promos/{PromoCarousel.js → PromosCarousel.js} +9 -5
- package/dist/components/Promos/PromosGrid.d.ts +2 -0
- package/dist/components/Promos/PromosGrid.js +16 -0
- package/dist/components/SignIn/MobileNumberSignIn.js +5 -1
- package/dist/components/SignIn/NameAndPasswordSignIn.js +83 -20
- package/dist/components/SignIn/SignIn.js +6 -3
- package/dist/components/SignIn/SignInContext.d.ts +2 -12
- package/dist/components/SignIn/SignInContext.js +2 -18
- package/dist/components/SignIn/SignInForm.js +3 -3
- package/dist/components/SignIn/useSignIn.d.ts +10 -0
- package/dist/components/SignIn/useSignIn.js +11 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/constants/index.d.ts +4 -2
- package/dist/constants/index.js +24 -0
- package/dist/server/utils/index.d.ts +4 -0
- package/dist/server/utils/index.js +4 -0
- package/dist/server/utils/prefetchBonusQuery.d.ts +1 -0
- package/dist/server/utils/prefetchBonusQuery.js +22 -0
- package/dist/server/utils/prefetchCashbackBonusQuery.d.ts +1 -0
- package/dist/server/utils/prefetchCashbackBonusQuery.js +22 -0
- package/dist/server/utils/prefetchCashbackBonusesQuery.d.ts +1 -0
- package/dist/server/utils/prefetchCashbackBonusesQuery.js +22 -0
- package/dist/server/utils/prefetchCashbackQuery.d.ts +1 -0
- package/dist/server/utils/prefetchCashbackQuery.js +17 -0
- package/dist/ui/Badge/Badge.d.ts +12 -0
- package/dist/ui/Badge/badge.recipe.d.ts +3 -0
- package/dist/ui/Badge/badge.recipe.js +11 -0
- package/dist/ui/Progress/progress.recipe.js +1 -1
- package/dist/utils/queryKeys.d.ts +6 -0
- package/dist/utils/queryKeys.js +18 -0
- package/package.json +3 -3
- package/dist/components/AccountPaymentMethods/AccountPaymentMethods.d.ts +0 -1
- package/dist/components/AccountPaymentMethods/AccountPaymentMethods.js +0 -3
- package/dist/components/AccountPaymentMethods/index.d.ts +0 -1
- package/dist/components/AccountPaymentMethods/index.js +0 -1
- package/dist/components/AccountVerification/AccountVerificationContext.d.ts +0 -14
- package/dist/components/AccountVerification/AccountVerificationContext.js +0 -27
- package/dist/components/AccountVerification/VerificationCapture.d.ts +0 -1
- package/dist/components/AccountVerification/VerificationCapture.js +0 -28
- package/dist/components/AccountVerification/VerificationComplete.d.ts +0 -1
- package/dist/components/AccountVerification/VerificationComplete.js +0 -9
- package/dist/components/AccountVerification/VerificationDetails.d.ts +0 -1
- package/dist/components/AccountVerification/VerificationDetails.js +0 -38
- package/dist/components/GamesSearch/GamesSearchTrigger.d.ts +0 -5
- package/dist/components/GamesSearch/GamesSearchTrigger.js +0 -14
- package/dist/components/KYC/AccountVerificationContext.d.ts +0 -14
- package/dist/components/KYC/AccountVerificationContext.js +0 -27
- package/dist/components/KYC/VerificationCapture.d.ts +0 -1
- package/dist/components/KYC/VerificationCapture.js +0 -28
- package/dist/components/KYC/VerificationComplete.d.ts +0 -1
- package/dist/components/KYC/VerificationComplete.js +0 -9
- package/dist/components/KYC/VerificationDetails.d.ts +0 -1
- package/dist/components/KYC/VerificationDetails.js +0 -38
- package/dist/components/Promo/PromoContent.d.ts +0 -2
- package/dist/components/Promo/PromoContent.js +0 -9
- package/dist/components/Promos/PromoCarousel.d.ts +0 -2
- package/dist/components/Promos/PromoGrid.d.ts +0 -2
- package/dist/components/Promos/PromoGrid.js +0 -11
- package/dist/components/Promos/PromoItem.d.ts +0 -7
- package/dist/components/Promos/PromoItem.js +0 -17
- package/dist/components/Rewards/Rewards.client.d.ts +0 -2
- package/dist/components/Rewards/Rewards.client.js +0 -25
- package/dist/components/Rewards/Rewards.d.ts +0 -15
- package/dist/components/Rewards/Rewards.js +0 -7
- package/dist/components/Rewards/index.d.ts +0 -1
- package/dist/components/Rewards/index.js +0 -1
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
export * from './useAccountQuery';
|
|
2
2
|
export * from './useAuthenticateMutation';
|
|
3
3
|
export * from './useAvailablePromosQuery';
|
|
4
|
+
export * from './useAvailableQuestsQuery';
|
|
4
5
|
export * from './useBetRecordsQuery';
|
|
5
6
|
export * from './useBonusesQuery';
|
|
7
|
+
export * from './useBonusQuery';
|
|
8
|
+
export * from './useCashbackBonusesQuery';
|
|
9
|
+
export * from './useCashbackBonusQuery';
|
|
10
|
+
export * from './useCashbackQuery';
|
|
6
11
|
export * from './useCashbacksQuery';
|
|
12
|
+
export * from './useCheckInDailyCheckInQuestMutation';
|
|
13
|
+
export * from './useClaimCashbackBonusMutation';
|
|
14
|
+
export * from './useClaimSpotBonusMutation';
|
|
7
15
|
export * from './useControllableState';
|
|
8
16
|
export * from './useCooldown';
|
|
9
17
|
export * from './useCreateGameSessionMutation';
|
|
@@ -53,5 +61,3 @@ export * from './useUnreadMessagesCountQuery';
|
|
|
53
61
|
export * from './useUpdateAccountMutation';
|
|
54
62
|
export * from './useWalletQuery';
|
|
55
63
|
export * from './useWithdrawalRecordsQuery';
|
|
56
|
-
export * from './useAvailableQuestsQuery';
|
|
57
|
-
export * from './useCheckInDailyCheckInQuestMutation';
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
export * from './useAccountQuery.js';
|
|
2
2
|
export * from './useAuthenticateMutation.js';
|
|
3
3
|
export * from './useAvailablePromosQuery.js';
|
|
4
|
+
export * from './useAvailableQuestsQuery.js';
|
|
4
5
|
export * from './useBetRecordsQuery.js';
|
|
5
6
|
export * from './useBonusesQuery.js';
|
|
7
|
+
export * from './useBonusQuery.js';
|
|
8
|
+
export * from './useCashbackBonusesQuery.js';
|
|
9
|
+
export * from './useCashbackBonusQuery.js';
|
|
10
|
+
export * from './useCashbackQuery.js';
|
|
6
11
|
export * from './useCashbacksQuery.js';
|
|
12
|
+
export * from './useCheckInDailyCheckInQuestMutation.js';
|
|
13
|
+
export * from './useClaimCashbackBonusMutation.js';
|
|
14
|
+
export * from './useClaimSpotBonusMutation.js';
|
|
7
15
|
export * from './useControllableState.js';
|
|
8
16
|
export * from './useCooldown.js';
|
|
9
17
|
export * from './useCreateGameSessionMutation.js';
|
|
@@ -53,5 +61,3 @@ export * from './useUnreadMessagesCountQuery.js';
|
|
|
53
61
|
export * from './useUpdateAccountMutation.js';
|
|
54
62
|
export * from './useWalletQuery.js';
|
|
55
63
|
export * from './useWithdrawalRecordsQuery.js';
|
|
56
|
-
export * from './useAvailableQuestsQuery.js';
|
|
57
|
-
export * from './useCheckInDailyCheckInQuestMutation.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getBonus } from '@opexa/portal-sdk-core';
|
|
2
|
+
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import invariant from 'tiny-invariant';
|
|
4
|
+
import { ENVIRONMENT, PLATFORM_CODE } from '../../constants/index.js';
|
|
5
|
+
import { getBonusQueryKey, getQueryClient, getSessionQueryKey, } from '../../utils/index.js';
|
|
6
|
+
import { getSession } from '../services/index.js';
|
|
7
|
+
import { useSessionQuery } from './useSessionQuery.js';
|
|
8
|
+
export const useBonusQuery = (id, config) => {
|
|
9
|
+
const queryClient = getQueryClient();
|
|
10
|
+
const sessionQuery = useSessionQuery();
|
|
11
|
+
const query = useQuery({
|
|
12
|
+
...config,
|
|
13
|
+
enabled: config?.enabled === false
|
|
14
|
+
? false
|
|
15
|
+
: sessionQuery.data?.status === 'authenticated',
|
|
16
|
+
queryKey: getBonusQueryKey(id),
|
|
17
|
+
queryFn: async ({ signal }) => {
|
|
18
|
+
const session = await queryClient.fetchQuery({
|
|
19
|
+
queryKey: getSessionQueryKey(),
|
|
20
|
+
queryFn: () => getSession(),
|
|
21
|
+
});
|
|
22
|
+
invariant(session.status === 'authenticated');
|
|
23
|
+
return await getBonus(id, {
|
|
24
|
+
signal,
|
|
25
|
+
environment: ENVIRONMENT,
|
|
26
|
+
headers: {
|
|
27
|
+
'Platform-Code': PLATFORM_CODE,
|
|
28
|
+
Authorization: `Bearer ${session.token}`,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
return query;
|
|
34
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getCashbackBonus } from '@opexa/portal-sdk-core';
|
|
2
|
+
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import invariant from 'tiny-invariant';
|
|
4
|
+
import { ENVIRONMENT, PLATFORM_CODE } from '../../constants/index.js';
|
|
5
|
+
import { getCashbackBonusQueryKey, getQueryClient, getSessionQueryKey, } from '../../utils/index.js';
|
|
6
|
+
import { getSession } from '../services/index.js';
|
|
7
|
+
import { useSessionQuery } from './useSessionQuery.js';
|
|
8
|
+
export const useCashbackBonusQuery = (id, config) => {
|
|
9
|
+
const queryClient = getQueryClient();
|
|
10
|
+
const sessionQuery = useSessionQuery();
|
|
11
|
+
const query = useQuery({
|
|
12
|
+
...config,
|
|
13
|
+
enabled: config?.enabled === false
|
|
14
|
+
? false
|
|
15
|
+
: sessionQuery.data?.status === 'authenticated',
|
|
16
|
+
queryKey: getCashbackBonusQueryKey(id),
|
|
17
|
+
queryFn: async ({ signal }) => {
|
|
18
|
+
const session = await queryClient.fetchQuery({
|
|
19
|
+
queryKey: getSessionQueryKey(),
|
|
20
|
+
queryFn: () => getSession(),
|
|
21
|
+
});
|
|
22
|
+
invariant(session.status === 'authenticated');
|
|
23
|
+
return await getCashbackBonus(id, {
|
|
24
|
+
signal,
|
|
25
|
+
environment: ENVIRONMENT,
|
|
26
|
+
headers: {
|
|
27
|
+
'Platform-Code': PLATFORM_CODE,
|
|
28
|
+
Authorization: `Bearer ${session.token}`,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
return query;
|
|
34
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getCashbackBonuses } from '@opexa/portal-sdk-core';
|
|
2
|
+
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import invariant from 'tiny-invariant';
|
|
4
|
+
import { ENVIRONMENT, PLATFORM_CODE } from '../../constants/index.js';
|
|
5
|
+
import { getCashbackBonusesQueryKey, getQueryClient, getSessionQueryKey, } from '../../utils/index.js';
|
|
6
|
+
import { getSession } from '../services/index.js';
|
|
7
|
+
import { useSessionQuery } from './useSessionQuery.js';
|
|
8
|
+
export const useCashbackBonusesQuery = (config) => {
|
|
9
|
+
const queryClient = getQueryClient();
|
|
10
|
+
const sessionQuery = useSessionQuery();
|
|
11
|
+
return useQuery({
|
|
12
|
+
...config,
|
|
13
|
+
enabled: config?.enabled === false
|
|
14
|
+
? false
|
|
15
|
+
: sessionQuery.data?.status === 'authenticated',
|
|
16
|
+
queryKey: getCashbackBonusesQueryKey(),
|
|
17
|
+
queryFn: async ({ signal }) => {
|
|
18
|
+
const session = await queryClient.fetchQuery({
|
|
19
|
+
queryKey: getSessionQueryKey(),
|
|
20
|
+
queryFn: () => getSession(),
|
|
21
|
+
});
|
|
22
|
+
invariant(session.status === 'authenticated');
|
|
23
|
+
return await getCashbackBonuses({
|
|
24
|
+
signal,
|
|
25
|
+
environment: ENVIRONMENT,
|
|
26
|
+
headers: {
|
|
27
|
+
'Platform-Code': PLATFORM_CODE,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getCashback } from '@opexa/portal-sdk-core';
|
|
2
|
+
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import { ENVIRONMENT, PLATFORM_CODE } from '../../constants/index.js';
|
|
4
|
+
import { getCashbackQueryKey } from '../../utils/index.js';
|
|
5
|
+
export const useCashbackQuery = (id, config) => {
|
|
6
|
+
return useQuery({
|
|
7
|
+
...config,
|
|
8
|
+
enabled: !id ? false : config?.enabled,
|
|
9
|
+
queryKey: getCashbackQueryKey(id),
|
|
10
|
+
queryFn: async ({ signal }) => {
|
|
11
|
+
return await getCashback(id, {
|
|
12
|
+
signal,
|
|
13
|
+
environment: ENVIRONMENT,
|
|
14
|
+
headers: {
|
|
15
|
+
'Platform-Code': PLATFORM_CODE,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { claimCashbackBonus } from '@opexa/portal-sdk-core';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import invariant from 'tiny-invariant';
|
|
4
|
+
import { ENVIRONMENT, PLATFORM_CODE } from '../../constants/index.js';
|
|
5
|
+
import { getCashbackBonusesQueryKey, getClaimCashbackBonusMutationKey, getQueryClient, getSessionQueryKey, } from '../../utils/index.js';
|
|
6
|
+
import { getSession } from '../services/index.js';
|
|
7
|
+
export const useClaimCashbackBonusMutation = (config) => {
|
|
8
|
+
const queryClient = getQueryClient();
|
|
9
|
+
return useMutation({
|
|
10
|
+
...config,
|
|
11
|
+
mutationKey: getClaimCashbackBonusMutationKey(),
|
|
12
|
+
mutationFn: async (id) => {
|
|
13
|
+
const session = await queryClient.fetchQuery({
|
|
14
|
+
queryKey: getSessionQueryKey(),
|
|
15
|
+
queryFn: () => getSession(),
|
|
16
|
+
});
|
|
17
|
+
invariant(session.status === 'authenticated');
|
|
18
|
+
await claimCashbackBonus(id, {
|
|
19
|
+
environment: ENVIRONMENT,
|
|
20
|
+
headers: {
|
|
21
|
+
'Platform-Code': PLATFORM_CODE,
|
|
22
|
+
Authorization: `Bearer ${session.token}`,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
queryClient.setQueryData(getCashbackBonusesQueryKey(), (prev) => prev?.filter((bonus) => bonus.id !== id));
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { claimSpotBonus } from '@opexa/portal-sdk-core';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import invariant from 'tiny-invariant';
|
|
4
|
+
import { ENVIRONMENT, PLATFORM_CODE } from '../../constants/index.js';
|
|
5
|
+
import { getBonusesQueryKey, getClaimSpotBonusMutationKey, getQueryClient, getSessionQueryKey, } from '../../utils/index.js';
|
|
6
|
+
import { getSession } from '../services/index.js';
|
|
7
|
+
export const useClaimSpotBonusMutation = (config) => {
|
|
8
|
+
const queryClient = getQueryClient();
|
|
9
|
+
return useMutation({
|
|
10
|
+
...config,
|
|
11
|
+
mutationKey: getClaimSpotBonusMutationKey(),
|
|
12
|
+
mutationFn: async (id) => {
|
|
13
|
+
const session = await queryClient.fetchQuery({
|
|
14
|
+
queryKey: getSessionQueryKey(),
|
|
15
|
+
queryFn: () => getSession(),
|
|
16
|
+
});
|
|
17
|
+
invariant(session.status === 'authenticated');
|
|
18
|
+
await claimSpotBonus(id, {
|
|
19
|
+
environment: ENVIRONMENT,
|
|
20
|
+
headers: {
|
|
21
|
+
'Platform-Code': PLATFORM_CODE,
|
|
22
|
+
Authorization: `Bearer ${session.token}`,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
queryClient.setQueryData(getBonusesQueryKey(), (prev) => prev?.filter((bonus) => bonus.id !== id));
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface CreateContextOptions<T, S extends boolean> {
|
|
3
|
+
strict?: S;
|
|
4
|
+
defaultValue?: T;
|
|
5
|
+
}
|
|
6
|
+
type CreateContextReturn<T, S extends boolean> = [S] extends [true] ? [React.Context<T>, () => T] : [React.Context<T>, () => T | null];
|
|
7
|
+
export declare function createContext<T>(options?: CreateContextOptions<T, true>): CreateContextReturn<T, true>;
|
|
8
|
+
export declare function createContext<T>(options?: CreateContextOptions<T, false>): CreateContextReturn<T, false>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import invariant from 'tiny-invariant';
|
|
3
|
+
export function createContext(options) {
|
|
4
|
+
const strict = options?.strict ?? true;
|
|
5
|
+
const defaultValue = options?.defaultValue ?? null;
|
|
6
|
+
const Context = React.createContext(defaultValue ?? null);
|
|
7
|
+
function useContext() {
|
|
8
|
+
const context = React.useContext(Context);
|
|
9
|
+
if (!context && strict)
|
|
10
|
+
invariant(context);
|
|
11
|
+
return context;
|
|
12
|
+
}
|
|
13
|
+
return [Context, useContext];
|
|
14
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { differenceInDays, differenceInHours, differenceInMinutes, isAfter, } from 'date-fns';
|
|
4
|
+
import { clamp } from 'lodash-es';
|
|
5
|
+
import Image from 'next/image';
|
|
6
|
+
import Link from 'next/link';
|
|
7
|
+
import { useState } from 'react';
|
|
8
|
+
import { useInterval } from 'usehooks-ts';
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
import { useBonusesQuery, useCashbackBonusesQuery, useClaimCashbackBonusMutation, useLocaleInfo, } from '../../client/hooks/index.js';
|
|
11
|
+
import { Gift01Icon, StopWatchIcon } from '../../icons/index.js';
|
|
12
|
+
import { Badge, Button, Progress, SegmentGroup } from '../../ui/index.js';
|
|
13
|
+
import { capitalize, formatNumber, parseDecimal } from '../../utils/index.js';
|
|
14
|
+
import { Empty } from '../Empty.js';
|
|
15
|
+
import moneyOnHand from './money-on-hand.png';
|
|
16
|
+
import piggyBank from './piggy-bank.png';
|
|
17
|
+
const TABS = ['ALL', 'ACTIVE', 'CASHBACKS'];
|
|
18
|
+
export function Bonuses__client(props) {
|
|
19
|
+
const [tab, setTab] = useState(TABS[0]);
|
|
20
|
+
const bonusesQuery = useBonusesQuery();
|
|
21
|
+
const cashbackBonusesQuery = useCashbackBonusesQuery();
|
|
22
|
+
const bonuses = tab === 'CASHBACKS'
|
|
23
|
+
? []
|
|
24
|
+
: (bonusesQuery.data ?? []).filter((bonus) => {
|
|
25
|
+
return tab === 'ACTIVE' ? (new Date(), bonus.expiration) : true;
|
|
26
|
+
});
|
|
27
|
+
const cashbackBonuses = (cashbackBonusesQuery.data ?? []).filter((bonus) => {
|
|
28
|
+
return tab === 'ACTIVE'
|
|
29
|
+
? isAfter(new Date(), bonus.cashback.activationEndDateTime)
|
|
30
|
+
: true;
|
|
31
|
+
});
|
|
32
|
+
const empty = bonuses.length === 0 && cashbackBonuses.length === 0;
|
|
33
|
+
return (_jsxs("div", { className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Rewards' }), _jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
34
|
+
setTab(z.enum(TABS).parse(details.value));
|
|
35
|
+
}, className: "mt-3", children: [TABS.map((value) => (_jsxs(SegmentGroup.Item, { value: value, children: [_jsxs(SegmentGroup.ItemText, { children: [" ", capitalize(value)] }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }, value))), _jsx(SegmentGroup.Indicator, {})] }), empty && (_jsx(Empty, { className: "mt-8", icon: Gift01Icon, title: "No Rewards", message: "No reward is currently available." })), !empty && (_jsxs("div", { className: "mt-3xl grid gap-3xl lg:mt-lg lg:grid-cols-3", children: [tab !== 'CASHBACKS' && (_jsx(_Fragment, { children: bonuses.map((bonus) => (_jsx(Bonus, { data: bonus, viewDetailsUrl: props.viewBonusDetailsUrl ?? '/rewards/bonus' }, bonus.id))) })), cashbackBonuses.map((cashbackBonus) => (_jsx(CashbackBonus, { data: cashbackBonus, viewDetailsUrl: props.viewCashbackDetailsUrl ?? '/rewards/cashback' }, cashbackBonus.id)))] }))] }));
|
|
36
|
+
}
|
|
37
|
+
function useExpirationCounter(value) {
|
|
38
|
+
const [now, setNow] = useState(new Date());
|
|
39
|
+
const expiration = new Date(value);
|
|
40
|
+
const expired = isAfter(now, expiration);
|
|
41
|
+
const days = expired ? 0 : differenceInDays(expiration, now);
|
|
42
|
+
const hours = expired ? 0 : differenceInHours(expiration, now) - days * 24;
|
|
43
|
+
const minutes = expired
|
|
44
|
+
? 0
|
|
45
|
+
: differenceInMinutes(expiration, now) - days * 24 * 60 - hours * 60;
|
|
46
|
+
useInterval(() => setNow(new Date()), expired ? null : 1000);
|
|
47
|
+
return {
|
|
48
|
+
days,
|
|
49
|
+
hours,
|
|
50
|
+
minutes,
|
|
51
|
+
toString() {
|
|
52
|
+
return `${days}d:${hours}h:${minutes}m`;
|
|
53
|
+
},
|
|
54
|
+
expired,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function Bonus(props) {
|
|
58
|
+
const bonus = props.data;
|
|
59
|
+
const promo = bonus.promo;
|
|
60
|
+
const localeInfo = useLocaleInfo();
|
|
61
|
+
const expirationCounter = useExpirationCounter(bonus.expiration);
|
|
62
|
+
return (_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex flex-col overflow-hidden rounded-2xl border", children: [_jsxs("div", { className: "relative", children: [promo.banner?.url ? (_jsx(Image, { src: promo.banner.url, alt: "", width: 400, height: 200, className: "h-auto w-full" })) : (_jsx(DefaultImage, { type: "bonus" })), _jsxs(Badge.Root, { size: "lg", round: false, colorScheme: expirationCounter.expired ? 'danger' : 'gray', className: "absolute right-4 top-4", children: [_jsx(Badge.Icon, { children: _jsx(StopWatchIcon, {}) }), _jsx(Badge.Label, { children: expirationCounter.expired
|
|
63
|
+
? 'Expired'
|
|
64
|
+
: expirationCounter.toString() })] })] }), _jsxs("div", { className: "flex grow flex-col px-xl py-3xl", children: [_jsx("h2", { className: "text-center text-xl font-semibold text-white", children: promo.name }), _jsxs("div", { className: "mt-2 flex items-baseline justify-center gap-2", children: [_jsx("p", { className: "text-3xl font-semibold leading-none", children: formatNumber(bonus.balance, {
|
|
65
|
+
currency: localeInfo.currency.code,
|
|
66
|
+
}) }), _jsxs("p", { className: "text-text-secondary-700 text-xl font-semibold leading-none", children: ["/\u00A0", formatNumber(bonus.amount, {
|
|
67
|
+
currency: localeInfo.currency.code,
|
|
68
|
+
})] })] }), _jsxs("div", { className: "text-text-primary-brand mt-md flex justify-between", children: [_jsxs("p", { children: ["Wagering ", bonus.currentTurnoverRequirementContributionPercentage, "%"] }), _jsxs("p", { children: [bonus.currentTurnoverRequirementContributionPercentage, "/100"] })] }), _jsx(Progress.Root, { min: 0, max: 100, value: clamp(parseDecimal(bonus.currentTurnoverRequirementContributionPercentage, 0), 0, 100), className: "mt-2", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("div", { className: "grow" }), _jsx(Button, { variant: "outline", className: "mt-6", asChild: true, children: _jsx(Link, { href: `${props.viewDetailsUrl}/${bonus.id}`, children: "See More" }) })] })] }));
|
|
69
|
+
}
|
|
70
|
+
function CashbackBonus(props) {
|
|
71
|
+
const bonus = props.data;
|
|
72
|
+
const cashback = bonus.cashback;
|
|
73
|
+
const localeInfo = useLocaleInfo();
|
|
74
|
+
const claimCashbackBonusMutation = useClaimCashbackBonusMutation();
|
|
75
|
+
return (_jsxs("div", { className: "border-border-primary bg-bg-tertiary flex flex-col overflow-hidden rounded-2xl border", children: [cashback.banner?.url ? (_jsx(Image, { src: cashback.banner.url, alt: "", width: 400, height: 200, className: "h-auto w-full" })) : (_jsx(DefaultImage, { type: "cashback" })), _jsxs("div", { className: "flex grow flex-col px-xl py-3xl", children: [_jsx("p", { className: "text-center text-xl font-semibold text-white", children: cashback.name }), _jsx("h2", { className: "mt-2 text-center text-3xl font-semibold text-white", children: formatNumber(bonus.balance, {
|
|
76
|
+
currency: localeInfo.currency.code,
|
|
77
|
+
}) }), _jsx("div", { className: "text-text-secondary-700 mt-2 line-clamp-1 text-center text-sm", dangerouslySetInnerHTML: {
|
|
78
|
+
__html: cashback.description,
|
|
79
|
+
} }), _jsx("div", { className: "grow" }), _jsx(Button, { className: "mt-6", disabled: claimCashbackBonusMutation.isPending, onClick: () => {
|
|
80
|
+
claimCashbackBonusMutation.mutate(bonus.id);
|
|
81
|
+
}, children: "Claim" })] })] }));
|
|
82
|
+
}
|
|
83
|
+
function DefaultImage({ type }) {
|
|
84
|
+
return (_jsxs("div", { style: {
|
|
85
|
+
background: 'radial-gradient(75.21% 75.21% at 50% 50%, rgba(249, 163, 8, 0.3) 0%, rgba(0, 0, 0, 0) 100%), var(--color-bg-primary-alt)',
|
|
86
|
+
}, children: [type === 'bonus' && (_jsx(Image, { src: piggyBank, alt: "", className: "mx-auto h-auto w-[50%] shrink-0", draggable: false, width: 600 })), type === 'cashback' && (_jsx(Image, { src: moneyOnHand, alt: "", className: "mx-auto h-auto w-[50%] shrink-0", draggable: false, width: 600 }))] }));
|
|
87
|
+
}
|
|
@@ -3,13 +3,13 @@ export interface BonusesProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
/**
|
|
5
5
|
* @description base URL for the bonus details page
|
|
6
|
-
* @default "/rewards"
|
|
6
|
+
* @default "/rewards/bonus"
|
|
7
7
|
*/
|
|
8
8
|
viewBonusDetailsUrl?: string;
|
|
9
9
|
/**
|
|
10
10
|
* @description base URL for the cashback details page
|
|
11
|
-
* @default "/
|
|
11
|
+
* @default "/rewards/cashback"
|
|
12
12
|
*/
|
|
13
13
|
viewCashbackDetailsUrl?: string;
|
|
14
14
|
}
|
|
15
|
-
export declare function Bonuses(props: BonusesProps): import("react/jsx-runtime").JSX.Element
|
|
15
|
+
export declare function Bonuses(props: BonusesProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return (_jsxs("div", { className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Rewards' }), _jsxs(SegmentGroup.Root, { defaultValue: "all", className: "mt-3 w-full lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "all", className: "w-full lg:w-auto", children: [_jsx(SegmentGroup.ItemText, { children: "All" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "active", className: "w-full lg:w-auto", children: [_jsx(SegmentGroup.ItemText, { children: "Active" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "cashbacks", className: "w-full lg:w-auto", children: [_jsx(SegmentGroup.ItemText, { children: "Cashback" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(SegmentGroup.Indicator, {})] }), _jsxs("div", { className: "mt-3xl grid gap-3xl lg:grid-cols-3", children: [_jsx(Bonus, {}), _jsx(Cashback, {})] })] }));
|
|
8
|
-
}
|
|
9
|
-
function Bonus(props) {
|
|
10
|
-
return (_jsxs("div", { className: "border-border-primary bg-bg-tertiary overflow-hidden rounded-2xl border", children: [_jsxs("div", { className: "relative", children: [_jsx(Image, { src: "https://images.pexels.com/photos/5868275/pexels-photo-5868275.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1", alt: "", width: 400, height: 200, className: "h-auto w-full" }), _jsxs(Badge.Root, { size: "lg", round: false, colorScheme: "brand", className: "absolute right-4 top-4", children: [_jsx(Badge.Icon, { children: _jsx(StopWatchIcon, {}) }), _jsx(Badge.Label, { children: "9d:10h:11m" })] })] }), _jsxs("div", { className: "px-xl py-3xl", children: [_jsx("h2", { className: "text-center text-xl font-semibold text-white", children: "50 PHP First Deposit Bonus" }), _jsxs("div", { className: "text-text-primary-brand mt-xl flex justify-between", children: [_jsx("p", { children: "Your bonus" }), _jsx("p", { children: "\u20B120.00" })] }), _jsxs("div", { className: "text-text-primary-brand mt-2 flex justify-between", children: [_jsx("p", { children: "Wagering 40%" }), _jsx("p", { children: "400/1000" })] }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx(Button, { variant: "outline", className: "mt-6", asChild: true, children: _jsx(Link, { href: props.viewDetailsUrl ?? '/rewards/1', children: "See More" }) })] })] }));
|
|
11
|
-
}
|
|
12
|
-
function Cashback(props) {
|
|
13
|
-
console.log(props);
|
|
14
|
-
return (_jsxs("div", { className: "border-border-primary bg-bg-tertiary overflow-hidden rounded-2xl border", children: [_jsx(Image, { src: "https://images.pexels.com/photos/5868275/pexels-photo-5868275.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1", alt: "", width: 400, height: 200, className: "h-auto w-full" }), _jsxs("div", { className: "px-xl py-3xl", children: [_jsx("p", { className: "text-center text-xl font-semibold text-white", children: "Cashback" }), _jsx("h2", { className: "mt-2 text-center text-3xl font-semibold text-white", children: "\u20B120.48" }), _jsx("p", { className: "text-text-secondary-700 mt-2 text-center text-sm", children: "Claim your cashback reward and explore other exciting offers!" }), _jsx(Button, { className: "mt-6", children: "Claim" })] })] }));
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { prefetchBonusesQuery, prefetchCashbacksQuery, } from '../../server/utils/index.js';
|
|
3
|
+
import { Bonuses__client } from './Bonuses.client.js';
|
|
4
|
+
export async function Bonuses(props) {
|
|
5
|
+
await Promise.all([prefetchBonusesQuery(), prefetchCashbacksQuery()]);
|
|
6
|
+
return _jsx(Bonuses__client, { ...props });
|
|
15
7
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { CashbackProps } from './Cashback';
|
|
2
|
-
export declare function Cashback__client(props: CashbackProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Cashback__client(props: CashbackProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { tz } from '@date-fns/tz';
|
|
4
|
+
import { format } from 'date-fns';
|
|
3
5
|
import Image from 'next/image';
|
|
4
6
|
import Link from 'next/link';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
+
import { useShallow } from 'zustand/shallow';
|
|
8
|
+
import { useGlobalStore, useLocaleInfo, usePromoQuery, } from '../../client/hooks/index.js';
|
|
9
|
+
import { ChevronLeftIcon } from '../../icons/index.js';
|
|
10
|
+
import { Button, Prose } from '../../ui/index.js';
|
|
7
11
|
export function Cashback__client(props) {
|
|
8
|
-
|
|
12
|
+
const localeInfo = useLocaleInfo();
|
|
13
|
+
const promoQuery = usePromoQuery(props.id);
|
|
14
|
+
const promo = promoQuery.data;
|
|
15
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
16
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
17
|
+
})));
|
|
18
|
+
if (!promo)
|
|
19
|
+
return null;
|
|
20
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "text-button-tertiary-fg flex w-fit items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), promo.banner.url && (_jsx(Image, { src: promo.banner.url, alt: "", width: 1024, height: 600, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" })), _jsx(Button, { className: "mt-xl lg:mt-6", onClick: () => {
|
|
21
|
+
globalStore.depositWithdrawal.setOpen(true);
|
|
22
|
+
}, children: "Deposit Now" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: promo.name }), _jsxs("p", { className: "text-text-secondary-700 mt-xl lg:mt-6", children: ["Ends", ' ', format(promo.activationEndDateTime, 'MM/dd/yyy hh:mm:ss A', {
|
|
23
|
+
in: tz(localeInfo.timezone),
|
|
24
|
+
})] }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
|
|
25
|
+
__html: promo.description,
|
|
26
|
+
} }), _jsxs(Prose, { className: "bg-bg-secondary mt-xl rounded-2xl p-2xl lg:mt-16 lg:p-4xl", children: [_jsx("h2", { children: "Conclusion" }), _jsx("p", { children: "Morbi sed imperdiet in ipsum, adipiscing elit dui lectus. Tellus id scelerisque est ultricies ultricies. Duis est sit sed leo nisl, blandit elit sagittis. Quisque tristique consequat quam sed. Nisl at scelerisque amet nulla purus habitasse." }), _jsx("p", { children: "Nunc sed faucibus bibendum feugiat sed interdum. Ipsum egestas condimentum mi massa. In tincidunt pharetra consectetur sed duis facilisis metus. Etiam egestas in nec sed et. Quis lobortis at sit dictum eget nibh tortor commodo cursus." }), _jsx("p", { children: "Odio felis sagittis, morbi feugiat tortor vitae feugiat fusce aliquet. Nam elementum urna nisi aliquet erat dolor enim. Ornare id morbi eget ipsum. Aliquam senectus neque ut id eget consectetur dictum. Donec posuere pharetra odio consequat scelerisque et, nunc tortor." })] })] }));
|
|
9
27
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export interface CashbackProps {
|
|
2
2
|
id: string;
|
|
3
|
+
/** @default '/promos' */
|
|
4
|
+
viewAllPromosUrl?: string;
|
|
3
5
|
className?: string;
|
|
4
|
-
/**
|
|
5
|
-
* @description URL for the bonuses details page
|
|
6
|
-
* @default "/rewards"
|
|
7
|
-
*/
|
|
8
|
-
viewAllUrl?: string;
|
|
9
6
|
}
|
|
10
7
|
export declare function Cashback(props: CashbackProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { notFound } from 'next/navigation';
|
|
3
|
+
import { prefetchCashbackQuery } from '../../server/utils/index.js';
|
|
4
|
+
import { getPromoQueryKey, getQueryClient } from '../../utils/index.js';
|
|
2
5
|
import { Cashback__client } from './Cashback.client.js';
|
|
3
6
|
export async function Cashback(props) {
|
|
4
|
-
|
|
7
|
+
await prefetchCashbackQuery(props.id);
|
|
8
|
+
const promo = getQueryClient().getQueryData(getPromoQueryKey(props.id));
|
|
9
|
+
if (promo) {
|
|
10
|
+
return _jsx(Cashback__client, { ...props });
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
return notFound();
|
|
14
|
+
}
|
|
5
15
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import Link from 'next/link';
|
|
5
|
+
import { ChevronLeftIcon, ChevronRightIcon, StopWatchIcon } from '../../icons/index.js';
|
|
6
|
+
import { Badge, Collapsible, Progress, Prose } from '../../ui/index.js';
|
|
7
|
+
export function CashbackBonus__client(props) {
|
|
8
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/rewards', className: "text-button-tertiary-fg flex items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to Rewards"] }), _jsx(Image, { src: "https://s3.ap-east-1.amazonaws.com/opexa-assets.opexasystem.com/assets/BSxIXEsa59_zzMAR27-ALLDAYREBATE06-STATIC-WEB-HB-1920x1080.png", alt: "", width: 1024, height: 600, className: "mt-3xl h-auto w-full rounded-xl" }), _jsxs(Badge.Root, { size: "lg", round: false, colorScheme: "brand", className: "mt-xl lg:mt-6", children: [_jsx(Badge.Icon, { children: _jsx(StopWatchIcon, {}) }), _jsx(Badge.Label, { children: "9d:10h:11m" })] }), _jsx("h1", { className: "text-text-primary-900 mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: "50 PHP First Deposit Bonus" }), _jsx("p", { className: "text-text-primary-brand mt-xl text-base lg:mt-6 lg:text-lg", children: "Complete the wagering before time runs out to convert your bonus balance into real money!" }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Your bonus" }), _jsxs("p", { children: [_jsx("span", { className: "text-text-primary-900", children: "20.00" }), " / 50.00 PHP"] })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Required Turnover" }), _jsx("p", { children: "5x" })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { children: "Wagering" }), _jsx("p", { children: "400/1000" })] }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] }), _jsxs(Collapsible.Root, { className: "mt-xl lg:mt-6", children: [_jsxs(Collapsible.Trigger, { className: "text-button-tertiary-fg flex w-fit items-center justify-center gap-sm text-sm font-semibold lg:mx-auto", children: ["Game Provider Contribution", _jsx(Collapsible.Indicator, { asChild: true, children: _jsx(ChevronRightIcon, { className: "size-5" }) })] }), _jsxs(Collapsible.Content, { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl space-y-1.5 rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Playson" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "25%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Betsoft Gaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "13%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Microgaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "50%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Realtime Gaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "10%" })] })] })] }), _jsxs(Prose, { className: "mt-xl lg:mt-6", children: [_jsx("h3", { children: "How to get bonus" }), _jsxs("ol", { children: [_jsx("li", { children: "All OFWin members are eligible for this program." }), _jsx("li", { children: "50 PHP of game credit will be automatically credited to the new member account upon completion of first deposit Auctor vel in vitae placerat." }), _jsx("li", { children: "Member must reach a 5x turnover requirement before a withdrawal can be made. Attempting to make a withdrawal before this turnover requirement is completed could cause your bonus to be voided." }), _jsx("li", { children: "Players will have 10 days from the date the bonus is awarded to complete the rollover requirement." }), _jsx("li", { children: "Bets used to meet other bonus rollover requirements will not count toward this promotion." })] }), _jsx("h3", { children: "Terms and Conditions" }), _jsxs("ul", { children: [_jsx("li", { children: "Only one account per player is allowed. No same IP address/bank account name allowed. Players who have multiple or fraudulent accounts will not be qualified for the promotion." }), _jsx("li", { children: "Players that are found to have any duplicate accounts or those who participate in fraudulent activities may have their funds forfeited and their accounts closed." }), _jsx("li", { children: "OFWin reserves the right to amend or cancel this Referral Program at any time. OFWin General Terms and Conditions apply." })] })] })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface CashbackBonusProps {
|
|
2
|
+
id: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
/**
|
|
5
|
+
* @description URL for the bonuses details page
|
|
6
|
+
* @default "/rewards"
|
|
7
|
+
*/
|
|
8
|
+
viewAllUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function CashbackBonus(props: CashbackBonusProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CashbackBonus';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CashbackBonus.js';
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts
CHANGED
|
@@ -8,8 +8,7 @@ export declare const OnlineBankDepositContext: import("react").Context<{
|
|
|
8
8
|
amount: string;
|
|
9
9
|
promo?: string | null;
|
|
10
10
|
}) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const useOnlineBankDepositContext: () => {
|
|
11
|
+
}>, useOnlineBankDepositContext: () => {
|
|
13
12
|
view: "form" | "vca";
|
|
14
13
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
15
14
|
verify: () => void;
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import { createContext
|
|
2
|
-
|
|
3
|
-
export const OnlineBankDepositContext = createContext(null);
|
|
4
|
-
export const useOnlineBankDepositContext = () => {
|
|
5
|
-
const context = useContext(OnlineBankDepositContext);
|
|
6
|
-
invariant(context);
|
|
7
|
-
return context;
|
|
8
|
-
};
|
|
1
|
+
import { createContext } from '../../../../client/utils/index.js';
|
|
2
|
+
export const [OnlineBankDepositContext, useOnlineBankDepositContext] = createContext();
|
|
@@ -8,8 +8,7 @@ export declare const QRPHDepositContext: import("react").Context<{
|
|
|
8
8
|
amount: string;
|
|
9
9
|
promo?: string | null;
|
|
10
10
|
}) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const useQRPHDepositContext: () => {
|
|
11
|
+
}>, useQRPHDepositContext: () => {
|
|
13
12
|
view: "form" | "qrCode";
|
|
14
13
|
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
15
14
|
verify: () => void;
|