@opexa/portal-components 0.0.29 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/hooks/useAccountQuery.d.ts +1 -1
- package/dist/client/hooks/useAuthenticateMutation.d.ts +1 -1
- package/dist/client/hooks/useAvailablePromosQuery.d.ts +1 -1
- package/dist/client/hooks/useBetRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useBonusesQuery.d.ts +1 -1
- package/dist/client/hooks/useCashbacksQuery.d.ts +1 -1
- package/dist/client/hooks/useCreateGCashDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateGameSessionMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateInstapayWithdrawalMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaAppDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaAppWithdrawalMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateMayaWithdrawalMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateOnlineBankDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useCreateQRPHDepositMutation.d.ts +1 -1
- package/dist/client/hooks/useDepositQuery.d.ts +1 -1
- package/dist/client/hooks/useDepositRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useDepositsCountQuery.d.ts +1 -1
- package/dist/client/hooks/useEndGameSessionMutation.d.ts +1 -1
- package/dist/client/hooks/useFavoriteGamesQuery.d.ts +1 -1
- package/dist/client/hooks/useGamesQuery.d.ts +1 -1
- package/dist/client/hooks/useInfiniteQueryHelper.d.ts +1 -1
- package/dist/client/hooks/useInstapayBankListQuery.d.ts +1 -1
- package/dist/client/hooks/useIsMayaSessionValidQuery.d.ts +1 -1
- package/dist/client/hooks/useJackpotPayoutsQuery.d.ts +1 -1
- package/dist/client/hooks/useJackpotsQuery.d.ts +1 -1
- package/dist/client/hooks/useLocaleInfo.d.ts +1 -1
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.d.ts +1 -1
- package/dist/client/hooks/useMarkMessageAsReadMutation.d.ts +1 -1
- package/dist/client/hooks/useMemberVerificationQuery.d.ts +1 -1
- package/dist/client/hooks/useMessagesQuery.d.ts +1 -1
- package/dist/client/hooks/usePaymentSettingsQuery.d.ts +1 -1
- package/dist/client/hooks/usePlatformQuery.d.ts +1 -1
- package/dist/client/hooks/useProfileCompletionQuery.d.ts +1 -1
- package/dist/client/hooks/usePromoQuery.d.ts +1 -1
- package/dist/client/hooks/usePromosQuery.d.ts +1 -1
- package/dist/client/hooks/useSendVerificationCodeMutation.d.ts +1 -1
- package/dist/client/hooks/useSessionQuery.d.ts +1 -1
- package/dist/client/hooks/useSignInMutation.d.ts +1 -1
- package/dist/client/hooks/useSignOutMutation.d.ts +1 -1
- package/dist/client/hooks/useSignUpMutation.d.ts +1 -1
- package/dist/client/hooks/useTopWinsQuery.d.ts +1 -1
- package/dist/client/hooks/useTournamentsQuery.d.ts +1 -1
- package/dist/client/hooks/useTransactionRecordsQuery.d.ts +1 -1
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.d.ts +1 -1
- package/dist/client/hooks/useUnreadMessagesCountQuery.d.ts +1 -1
- package/dist/client/hooks/useWalletQuery.d.ts +1 -1
- package/dist/client/hooks/useWithdrawalRecordsQuery.d.ts +1 -1
- package/dist/client/services/getSession.d.ts +1 -1
- package/dist/client/utils/{createRecipeContext.jsx → createRecipeContext.js} +4 -7
- package/dist/client/utils/index.js +1 -1
- package/dist/components/Account/Account.d.ts +1 -1
- package/dist/components/Account/Account.js +127 -0
- package/dist/components/Account/index.js +1 -1
- package/dist/components/AccountInfo/AccountInfo.d.ts +1 -1
- package/dist/components/AccountInfo/AccountInfo.js +18 -0
- package/dist/components/AccountInfo/index.js +1 -1
- package/dist/components/AccountPaymentMethods/index.js +1 -1
- package/dist/components/AccountSecurity/AccountSecurity.d.ts +1 -1
- package/dist/components/AccountSecurity/AccountSecurity.js +47 -0
- package/dist/components/AccountSecurity/index.js +1 -1
- package/dist/components/AccountVerification/index.js +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +38 -0
- package/dist/components/Banner/index.js +1 -1
- package/dist/components/BetRecords/BetRecords.d.ts +1 -1
- package/dist/components/BetRecords/BetRecords.js +192 -0
- package/dist/components/BetRecords/index.js +1 -1
- package/dist/components/Bonus/Bonus.client.d.ts +1 -1
- package/dist/components/Bonus/Bonus.client.js +9 -0
- package/dist/components/Bonus/Bonus.d.ts +1 -1
- package/dist/components/Bonus/Bonus.js +5 -0
- package/dist/components/Bonus/index.js +1 -1
- package/dist/components/Bonuses/Bonuses.d.ts +1 -1
- package/dist/components/Bonuses/Bonuses.js +15 -0
- package/dist/components/Bonuses/index.js +1 -1
- package/dist/components/DepositWithdrawal/AmountChoices.d.ts +1 -1
- package/dist/components/DepositWithdrawal/{AmountChoices.jsx → AmountChoices.js} +4 -7
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +26 -0
- package/dist/components/DepositWithdrawal/Deposit/Deposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/{Deposit.jsx → Deposit.js} +10 -20
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/{GCashDeposit.jsx → GCashDeposit.js} +32 -104
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/{MayaAppDeposit.jsx → MayaAppDeposit.js} +34 -106
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/{MayaDeposit.jsx → MayaDeposit.js} +32 -104
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +129 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositLoading.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositLoading.js +5 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositSuccess.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositSuccess.js +5 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +14 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +128 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositLoading.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositLoading.js +5 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +18 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.js +8 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +39 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +1 -1
- package/dist/components/DepositWithdrawal/{DepositWithdrawalTrigger.jsx → DepositWithdrawalTrigger.js} +3 -2
- package/dist/components/DepositWithdrawal/MayaSessionExpired.d.ts +1 -1
- package/dist/components/DepositWithdrawal/MayaSessionExpired.js +5 -0
- package/dist/components/DepositWithdrawal/PaymentMethods.d.ts +1 -1
- package/dist/components/DepositWithdrawal/{PaymentMethods.jsx → PaymentMethods.js} +7 -23
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/{GCashWithdrawal.jsx → GCashWithdrawal.js} +14 -78
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +128 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/{MayaAppWithdrawal.jsx → MayaAppWithdrawal.js} +16 -69
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/{MayaWithdrawal.jsx → MayaWithdrawal.js} +14 -78
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/{Withdrawal.jsx → Withdrawal.js} +14 -37
- package/dist/components/DepositWithdrawal/index.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.d.ts +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +14 -0
- package/dist/components/Disclaimer/index.js +1 -1
- package/dist/components/Empty.d.ts +1 -1
- package/dist/components/Empty.js +7 -0
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +1 -1
- package/dist/components/FavoriteGames/FavoriteGames.client.js +31 -0
- package/dist/components/FavoriteGames/FavoriteGames.d.ts +1 -1
- package/dist/components/FavoriteGames/FavoriteGames.js +7 -0
- package/dist/components/FavoriteGames/index.js +1 -1
- package/dist/components/GameLaunch/GameLaunch.d.ts +1 -1
- package/dist/components/GameLaunch/GameLaunch.js +99 -0
- package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +1 -1
- package/dist/components/GameLaunch/{GameLaunchTrigger.jsx → GameLaunchTrigger.js} +4 -3
- package/dist/components/GameLaunch/index.js +2 -2
- package/dist/components/GameProviders/GameProviders.d.ts +2 -2
- package/dist/components/GameProviders/GameProviders.js +32 -0
- package/dist/components/GameProviders/index.js +1 -1
- package/dist/components/Games/Games.client.d.ts +1 -1
- package/dist/components/Games/Games.client.js +84 -0
- package/dist/components/Games/Games.d.ts +1 -1
- package/dist/components/Games/{Games.jsx → Games.js} +3 -2
- package/dist/components/Games/index.js +1 -1
- package/dist/components/GamesSearch/GamesSearch.d.ts +1 -1
- package/dist/components/GamesSearch/GamesSearch.js +38 -0
- package/dist/components/GamesSearch/GamesSearchTrigger.d.ts +1 -1
- package/dist/components/GamesSearch/{GamesSearchTrigger.jsx → GamesSearchTrigger.js} +3 -2
- package/dist/components/GamesSearch/index.js +2 -2
- package/dist/components/InfiniteScroll.d.ts +1 -1
- package/dist/components/{InfiniteScroll.jsx → InfiniteScroll.js} +2 -7
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +1 -1
- package/dist/components/JackpotCounter/{JackpotCounter.client.jsx → JackpotCounter.client.js} +3 -30
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +1 -1
- package/dist/components/JackpotCounter/{JackpotCounter.jsx → JackpotCounter.js} +3 -2
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.js +114 -0
- package/dist/components/JackpotCounter/index.js +1 -1
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +2 -2
- package/dist/components/Jackpots/JackpotGameProviders.js +38 -0
- package/dist/components/Jackpots/JackpotItemDesktop.d.ts +2 -2
- package/dist/components/Jackpots/JackpotItemDesktop.js +44 -0
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +2 -2
- package/dist/components/Jackpots/JackpotItemMobile.js +48 -0
- package/dist/components/Jackpots/JackpotRules.d.ts +1 -1
- package/dist/components/Jackpots/JackpotRules.js +9 -0
- package/dist/components/Jackpots/Jackpots.d.ts +2 -2
- package/dist/components/Jackpots/Jackpots.js +26 -0
- package/dist/components/Jackpots/index.js +1 -1
- package/dist/components/Jackpots/useJackpotItemData.d.ts +2 -2
- package/dist/components/Jackpots/{useJackpotItemData.jsx → useJackpotItemData.js} +5 -4
- package/dist/components/KYC/KYC.d.ts +1 -1
- package/dist/components/KYC/KYC.js +19 -0
- package/dist/components/KYC/KYCTrigger.d.ts +1 -1
- package/dist/components/KYC/{KYCTrigger.jsx → KYCTrigger.js} +3 -2
- package/dist/components/KYC/Step1.d.ts +1 -1
- package/dist/components/KYC/Step1.js +10 -0
- package/dist/components/KYC/Step2.d.ts +1 -1
- package/dist/components/KYC/Step2.js +15 -0
- package/dist/components/KYC/Step3.d.ts +1 -1
- package/dist/components/KYC/Step3.js +11 -0
- package/dist/components/KYC/StepIndicator.d.ts +1 -1
- package/dist/components/KYC/StepIndicator.js +13 -0
- package/dist/components/KYC/UploadDocument.d.ts +1 -1
- package/dist/components/KYC/UploadDocument.js +8 -0
- package/dist/components/KYC/UploadSelfie.d.ts +1 -1
- package/dist/components/KYC/UploadSelfie.js +8 -0
- package/dist/components/KYC/index.js +2 -2
- package/dist/components/Marquee/Marquee.d.ts +1 -1
- package/dist/components/Marquee/Marquee.js +5 -0
- package/dist/components/Marquee/index.js +1 -1
- package/dist/components/Messages/MessageItem.d.ts +1 -1
- package/dist/components/Messages/MessageItem.js +28 -0
- package/dist/components/Messages/MessagePopup.d.ts +1 -1
- package/dist/components/Messages/MessagePopup.js +18 -0
- package/dist/components/Messages/Messages.d.ts +1 -1
- package/dist/components/Messages/Messages.js +31 -0
- package/dist/components/Messages/MessagesTrigger.d.ts +1 -1
- package/dist/components/Messages/{MessagesTrigger.jsx → MessagesTrigger.js} +3 -2
- package/dist/components/Messages/index.js +2 -2
- package/dist/components/Messages/utils.d.ts +1 -1
- package/dist/components/PortalProvider/PortalProvider.client.d.ts +1 -1
- package/dist/components/PortalProvider/PortalProvider.client.js +26 -0
- package/dist/components/PortalProvider/PortalProvider.d.ts +1 -1
- package/dist/components/PortalProvider/{PortalProvider.jsx → PortalProvider.js} +3 -6
- package/dist/components/PortalProvider/index.js +1 -1
- package/dist/components/Promo/Promo.d.ts +1 -1
- package/dist/components/Promo/Promo.js +8 -0
- package/dist/components/Promo/PromoContent.d.ts +1 -1
- package/dist/components/Promo/PromoContent.js +9 -0
- package/dist/components/Promo/index.js +1 -1
- package/dist/components/Promos/PromoCarousel.d.ts +1 -1
- package/dist/components/Promos/PromoCarousel.js +41 -0
- package/dist/components/Promos/PromoGrid.d.ts +1 -1
- package/dist/components/Promos/PromoGrid.js +12 -0
- package/dist/components/Promos/PromoItem.d.ts +1 -1
- package/dist/components/Promos/PromoItem.js +10 -0
- package/dist/components/Promos/Promos.d.ts +1 -1
- package/dist/components/Promos/Promos.js +11 -0
- package/dist/components/Promos/index.js +1 -1
- package/dist/components/Protected/index.js +1 -1
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +1 -1
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +58 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +1 -1
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +8 -0
- package/dist/components/Quests/Quests.d.ts +1 -1
- package/dist/components/Quests/Quests.js +6 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +1 -1
- package/dist/components/Quests/WageringQuest/WageringQuest.js +16 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +1 -1
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +8 -0
- package/dist/components/Quests/index.js +1 -1
- package/dist/components/SignIn/SignIn.d.ts +1 -1
- package/dist/components/SignIn/SignIn.js +15 -0
- package/dist/components/SignIn/SignInForm.d.ts +1 -1
- package/dist/components/SignIn/SignInForm.js +118 -0
- package/dist/components/SignIn/SignInTrigger.d.ts +1 -1
- package/dist/components/SignIn/{SignInTrigger.jsx → SignInTrigger.js} +3 -2
- package/dist/components/SignIn/index.js +2 -2
- package/dist/components/SignUp/SignUp.d.ts +1 -1
- package/dist/components/SignUp/SignUp.js +16 -0
- package/dist/components/SignUp/SignUpForm.d.ts +1 -1
- package/dist/components/SignUp/SignUpForm.js +133 -0
- package/dist/components/SignUp/SignUpTrigger.d.ts +1 -1
- package/dist/components/SignUp/{SignUpTrigger.jsx → SignUpTrigger.js} +3 -2
- package/dist/components/SignUp/index.js +2 -2
- package/dist/components/TopWins/TopWins.client.d.ts +1 -1
- package/dist/components/TopWins/TopWins.client.js +23 -0
- package/dist/components/TopWins/TopWins.d.ts +1 -1
- package/dist/components/TopWins/TopWins.js +7 -0
- package/dist/components/TopWins/index.js +1 -1
- package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +1 -1
- package/dist/components/TournamentCounter/{TournamentCounter.client.jsx → TournamentCounter.client.js} +3 -30
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +1 -1
- package/dist/components/TournamentCounter/{TournamentCounter.jsx → TournamentCounter.js} +3 -2
- package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +1 -2
- package/dist/components/TournamentCounter/TournamentCounterItem.js +96 -0
- package/dist/components/TournamentCounter/index.js +1 -1
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +1 -1
- package/dist/components/Tournaments/{TournamentGameProviders.jsx → TournamentGameProviders.js} +2 -23
- package/dist/components/Tournaments/TournamentItem.d.ts +1 -2
- package/dist/components/Tournaments/TournamentItem.js +97 -0
- package/dist/components/Tournaments/TournamentItemMobile.d.ts +1 -2
- package/dist/components/Tournaments/TournamentItemMobile.js +99 -0
- package/dist/components/Tournaments/TournamentRules.d.ts +1 -1
- package/dist/components/Tournaments/TournamentRules.js +9 -0
- package/dist/components/Tournaments/Tournaments.d.ts +1 -1
- package/dist/components/Tournaments/Tournaments.js +26 -0
- package/dist/components/Tournaments/index.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.d.ts +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +87 -0
- package/dist/components/TransactionRecords/TableFilters.d.ts +2 -2
- package/dist/components/TransactionRecords/TableFilters.js +212 -0
- package/dist/components/TransactionRecords/TransactionRecords.d.ts +1 -1
- package/dist/components/TransactionRecords/TransactionRecords.js +10 -0
- package/dist/components/TransactionRecords/TransactionRecordsTable.d.ts +1 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +62 -0
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.d.ts +1 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +81 -0
- package/dist/components/TransactionRecords/index.js +1 -1
- package/dist/icons/AlertCircleIcon.d.ts +1 -1
- package/dist/icons/AlertCircleIcon.js +4 -0
- package/dist/icons/AlertTriangle.d.ts +1 -1
- package/dist/icons/AlertTriangle.js +4 -0
- package/dist/icons/Announcement01Icon.d.ts +1 -1
- package/dist/icons/Announcement01Icon.js +4 -0
- package/dist/icons/ArrowLeftIcon.d.ts +1 -1
- package/dist/icons/ArrowLeftIcon.js +4 -0
- package/dist/icons/ArrowNarrowDownIcon.d.ts +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +4 -0
- package/dist/icons/ArrowNarrowUpIcon.d.ts +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +4 -0
- package/dist/icons/ArrowNarrowUpRightIcon.d.ts +1 -1
- package/dist/icons/ArrowNarrowUpRightIcon.js +4 -0
- package/dist/icons/ArrowRightIcon.d.ts +1 -1
- package/dist/icons/ArrowRightIcon.js +4 -0
- package/dist/icons/Award01Icon.d.ts +1 -1
- package/dist/icons/Award01Icon.js +4 -0
- package/dist/icons/Award02Icon.d.ts +1 -1
- package/dist/icons/Award02Icon.js +4 -0
- package/dist/icons/BankIcon.d.ts +1 -1
- package/dist/icons/BankIcon.js +4 -0
- package/dist/icons/Bell01Icon.d.ts +1 -1
- package/dist/icons/Bell01Icon.js +4 -0
- package/dist/icons/BellRingIcon.d.ts +1 -1
- package/dist/icons/BellRingIcon.js +4 -0
- package/dist/icons/CalendarIcon.d.ts +1 -1
- package/dist/icons/CalendarIcon.js +4 -0
- package/dist/icons/Camera01Icon.d.ts +1 -1
- package/dist/icons/Camera01Icon.js +4 -0
- package/dist/icons/CheckCircleBrokenIcon.d.ts +1 -1
- package/dist/icons/CheckCircleBrokenIcon.js +4 -0
- package/dist/icons/CheckCircleIcon.d.ts +1 -1
- package/dist/icons/CheckCircleIcon.js +4 -0
- package/dist/icons/CheckIcon.d.ts +1 -1
- package/dist/icons/CheckIcon.js +4 -0
- package/dist/icons/CheckVerified02Icon.d.ts +1 -1
- package/dist/icons/CheckVerified02Icon.js +4 -0
- package/dist/icons/ChevronDownIcon.d.ts +1 -1
- package/dist/icons/ChevronDownIcon.js +4 -0
- package/dist/icons/ChevronLeftIcon.d.ts +1 -1
- package/dist/icons/ChevronLeftIcon.js +4 -0
- package/dist/icons/ChevronRightIcon.d.ts +1 -1
- package/dist/icons/ChevronRightIcon.js +4 -0
- package/dist/icons/ChevronUpIcon.d.ts +1 -1
- package/dist/icons/ChevronUpIcon.js +4 -0
- package/dist/icons/ClockStopWatchIcon.d.ts +1 -1
- package/dist/icons/ClockStopWatchIcon.js +4 -0
- package/dist/icons/CoinsHandIcon.d.ts +1 -1
- package/dist/icons/CoinsHandIcon.js +4 -0
- package/dist/icons/CoinsStacked02Icon.d.ts +1 -1
- package/dist/icons/CoinsStacked02Icon.js +4 -0
- package/dist/icons/CoinsSwap02Icon.d.ts +1 -1
- package/dist/icons/CoinsSwap02Icon.js +4 -0
- package/dist/icons/CreditCard02Icon.d.ts +1 -1
- package/dist/icons/CreditCard02Icon.js +4 -0
- package/dist/icons/Diamond01Icon.d.ts +1 -1
- package/dist/icons/Diamond01Icon.js +4 -0
- package/dist/icons/Expand03Icon.d.ts +1 -1
- package/dist/icons/Expand03Icon.js +4 -0
- package/dist/icons/EyeIcon.d.ts +1 -1
- package/dist/icons/EyeIcon.js +4 -0
- package/dist/icons/EyeOffIcon.d.ts +1 -1
- package/dist/icons/EyeOffIcon.js +4 -0
- package/dist/icons/FacebookIcon.d.ts +1 -1
- package/dist/icons/FacebookIcon.js +4 -0
- package/dist/icons/File02Icon.d.ts +1 -1
- package/dist/icons/File02Icon.js +4 -0
- package/dist/icons/FileCheck02Icon.d.ts +1 -1
- package/dist/icons/FileCheck02Icon.js +4 -0
- package/dist/icons/Flag06Icon.d.ts +1 -1
- package/dist/icons/Flag06Icon.js +4 -0
- package/dist/icons/Gift01Icon.d.ts +1 -1
- package/dist/icons/Gift01Icon.js +4 -0
- package/dist/icons/GoogleIcon.d.ts +1 -1
- package/dist/icons/GoogleIcon.js +4 -0
- package/dist/icons/HelpCircleIcon.d.ts +1 -1
- package/dist/icons/HelpCircleIcon.js +4 -0
- package/dist/icons/InfoCircleIcon.d.ts +1 -1
- package/dist/icons/InfoCircleIcon.js +4 -0
- package/dist/icons/Lock01Icon.d.ts +1 -1
- package/dist/icons/Lock01Icon.js +4 -0
- package/dist/icons/Logout01Icon.d.ts +1 -1
- package/dist/icons/Logout01Icon.js +4 -0
- package/dist/icons/MarkerPin06Icon.d.ts +1 -1
- package/dist/icons/MarkerPin06Icon.js +4 -0
- package/dist/icons/Menu01Icon.d.ts +1 -1
- package/dist/icons/Menu01Icon.js +4 -0
- package/dist/icons/Menu03Icon.d.ts +1 -1
- package/dist/icons/Menu03Icon.js +4 -0
- package/dist/icons/PiggyBank02Icon.d.ts +1 -1
- package/dist/icons/PiggyBank02Icon.js +4 -0
- package/dist/icons/QrCode02Icon.d.ts +1 -1
- package/dist/icons/QrCode02Icon.js +4 -0
- package/dist/icons/SearchLgIcon.d.ts +1 -1
- package/dist/icons/SearchLgIcon.js +4 -0
- package/dist/icons/SearchRefractionIcon.d.ts +1 -1
- package/dist/icons/SearchRefractionIcon.js +4 -0
- package/dist/icons/Settings02Icon.d.ts +1 -1
- package/dist/icons/Settings02Icon.js +4 -0
- package/dist/icons/SpinnerIcon.d.ts +1 -1
- package/dist/icons/SpinnerIcon.js +5 -0
- package/dist/icons/Star01Icon.d.ts +1 -1
- package/dist/icons/Star01Icon.js +4 -0
- package/dist/icons/StarIcon.d.ts +1 -1
- package/dist/icons/StarIcon.js +4 -0
- package/dist/icons/StopWatchIcon.d.ts +1 -1
- package/dist/icons/StopWatchIcon.js +4 -0
- package/dist/icons/Target04Icon.d.ts +1 -1
- package/dist/icons/Target04Icon.js +4 -0
- package/dist/icons/Trophy01Icon.d.ts +1 -1
- package/dist/icons/Trophy01Icon.js +4 -0
- package/dist/icons/UploadCloud02Icon.d.ts +1 -1
- package/dist/icons/UploadCloud02Icon.js +4 -0
- package/dist/icons/User01Icon.d.ts +1 -1
- package/dist/icons/User01Icon.js +4 -0
- package/dist/icons/Wallet02Icon.d.ts +1 -1
- package/dist/icons/Wallet02Icon.js +4 -0
- package/dist/icons/XIcon.d.ts +1 -1
- package/dist/icons/XIcon.js +4 -0
- package/dist/icons/index.js +56 -56
- package/dist/middleware.d.ts +1 -0
- package/dist/middleware.js +1 -11
- package/dist/server/services/getSession.d.ts +1 -1
- package/dist/third-parties/FacebookPixel/index.js +1 -1
- package/dist/third-parties/GoogleRecaptcha/index.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/ui/AlertDialog/index.js +1 -1
- package/dist/ui/Avatar/index.js +1 -1
- package/dist/ui/Badge/Badge.js +12 -0
- package/dist/ui/Badge/index.js +1 -1
- package/dist/ui/Button/Button.d.ts +1 -1
- package/dist/ui/Button/{Button.jsx → Button.js} +3 -2
- package/dist/ui/Button/index.js +1 -1
- package/dist/ui/Checkbox/index.js +1 -1
- package/dist/ui/Clipboard/index.js +1 -1
- package/dist/ui/Collapsible/index.js +1 -1
- package/dist/ui/Combobox/index.js +1 -1
- package/dist/ui/DatePicker/index.js +1 -1
- package/dist/ui/Dialog/index.js +1 -1
- package/dist/ui/Drawer/index.js +1 -1
- package/dist/ui/Field/index.js +1 -1
- package/dist/ui/IconButton/IconButton.d.ts +1 -1
- package/dist/ui/IconButton/{IconButton.jsx → IconButton.js} +3 -2
- package/dist/ui/IconButton/index.js +1 -1
- package/dist/ui/Menu/index.js +1 -1
- package/dist/ui/NumberInput/index.js +1 -1
- package/dist/ui/PasswordInput/index.js +1 -1
- package/dist/ui/PinInput/index.js +1 -1
- package/dist/ui/Popover/index.js +1 -1
- package/dist/ui/Presence.d.ts +1 -1
- package/dist/ui/Presence.js +7 -0
- package/dist/ui/Progress/index.js +1 -1
- package/dist/ui/Prose.d.ts +1 -1
- package/dist/ui/Prose.js +5 -0
- package/dist/ui/SegmentGroup/index.js +1 -1
- package/dist/ui/Select/index.js +1 -1
- package/dist/ui/Table/index.js +1 -1
- package/dist/ui/Tabs/index.js +1 -1
- package/dist/ui/Tooltip/index.js +1 -1
- package/dist/ui/index.js +2 -2
- package/dist/utils/getLocaleInfo.js +175 -0
- package/dist/utils/index.js +1 -1
- package/package.json +3 -10
- package/dist/components/Account/Account.jsx +0 -313
- package/dist/components/AccountInfo/AccountInfo.jsx +0 -113
- package/dist/components/AccountSecurity/AccountSecurity.jsx +0 -142
- package/dist/components/Banner/Banner.jsx +0 -51
- package/dist/components/BetRecords/BetRecords.jsx +0 -470
- package/dist/components/Bonus/Bonus.client.jsx +0 -144
- package/dist/components/Bonus/Bonus.jsx +0 -4
- package/dist/components/Bonuses/Bonuses.jsx +0 -87
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.jsx +0 -73
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.jsx +0 -15
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.jsx +0 -203
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositLoading.jsx +0 -15
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositSuccess.jsx +0 -13
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.jsx +0 -90
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.jsx +0 -15
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.jsx +0 -197
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositLoading.jsx +0 -14
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.jsx +0 -104
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.jsx +0 -19
- package/dist/components/DepositWithdrawal/DepositWithdrawal.jsx +0 -95
- package/dist/components/DepositWithdrawal/MayaSessionExpired.jsx +0 -13
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.jsx +0 -218
- package/dist/components/Disclaimer/Disclaimer.jsx +0 -45
- package/dist/components/Empty.jsx +0 -62
- package/dist/components/FavoriteGames/FavoriteGames.client.jsx +0 -63
- package/dist/components/FavoriteGames/FavoriteGames.jsx +0 -6
- package/dist/components/GameLaunch/GameLaunch.jsx +0 -188
- package/dist/components/GameProviders/GameProviders.jsx +0 -60
- package/dist/components/Games/Games.client.jsx +0 -118
- package/dist/components/GamesSearch/GamesSearch.jsx +0 -110
- package/dist/components/JackpotCounter/JackpotCounterItem.jsx +0 -317
- package/dist/components/Jackpots/JackpotGameProviders.jsx +0 -59
- package/dist/components/Jackpots/JackpotItemDesktop.jsx +0 -251
- package/dist/components/Jackpots/JackpotItemMobile.jsx +0 -271
- package/dist/components/Jackpots/JackpotRules.jsx +0 -43
- package/dist/components/Jackpots/Jackpots.jsx +0 -37
- package/dist/components/KYC/KYC.jsx +0 -39
- package/dist/components/KYC/Step1.jsx +0 -37
- package/dist/components/KYC/Step2.jsx +0 -86
- package/dist/components/KYC/Step3.jsx +0 -68
- package/dist/components/KYC/StepIndicator.jsx +0 -22
- package/dist/components/KYC/UploadDocument.jsx +0 -30
- package/dist/components/KYC/UploadSelfie.jsx +0 -28
- package/dist/components/Marquee/Marquee.jsx +0 -20
- package/dist/components/Messages/MessageItem.jsx +0 -47
- package/dist/components/Messages/MessagePopup.jsx +0 -43
- package/dist/components/Messages/Messages.jsx +0 -87
- package/dist/components/PortalProvider/PortalProvider.client.jsx +0 -54
- package/dist/components/Promo/Promo.jsx +0 -7
- package/dist/components/Promo/PromoContent.jsx +0 -104
- package/dist/components/Promos/PromoCarousel.jsx +0 -69
- package/dist/components/Promos/PromoGrid.jsx +0 -24
- package/dist/components/Promos/PromoItem.jsx +0 -24
- package/dist/components/Promos/Promos.jsx +0 -10
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.jsx +0 -104
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.jsx +0 -46
- package/dist/components/Quests/Quests.jsx +0 -12
- package/dist/components/Quests/WageringQuest/WageringQuest.jsx +0 -58
- package/dist/components/Quests/WageringQuest/WageringQuestModal.jsx +0 -38
- package/dist/components/SignIn/SignIn.jsx +0 -29
- package/dist/components/SignIn/SignInForm.jsx +0 -233
- package/dist/components/SignUp/SignUp.jsx +0 -32
- package/dist/components/SignUp/SignUpForm.jsx +0 -230
- package/dist/components/TopWins/TopWins.client.jsx +0 -48
- package/dist/components/TopWins/TopWins.jsx +0 -6
- package/dist/components/TournamentCounter/TournamentCounterItem.jsx +0 -233
- package/dist/components/Tournaments/TournamentItem.jsx +0 -224
- package/dist/components/Tournaments/TournamentItemMobile.jsx +0 -242
- package/dist/components/Tournaments/TournamentRules.jsx +0 -43
- package/dist/components/Tournaments/Tournaments.jsx +0 -37
- package/dist/components/TransactionRecords/DepositRecordsTable.jsx +0 -193
- package/dist/components/TransactionRecords/TableFilters.jsx +0 -446
- package/dist/components/TransactionRecords/TransactionRecords.jsx +0 -39
- package/dist/components/TransactionRecords/TransactionRecordsTable.jsx +0 -147
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.jsx +0 -182
- package/dist/icons/AlertCircleIcon.jsx +0 -5
- package/dist/icons/AlertTriangle.jsx +0 -5
- package/dist/icons/Announcement01Icon.jsx +0 -5
- package/dist/icons/ArrowLeftIcon.jsx +0 -5
- package/dist/icons/ArrowNarrowDownIcon.jsx +0 -5
- package/dist/icons/ArrowNarrowUpIcon.jsx +0 -5
- package/dist/icons/ArrowNarrowUpRightIcon.jsx +0 -5
- package/dist/icons/ArrowRightIcon.jsx +0 -5
- package/dist/icons/Award01Icon.jsx +0 -5
- package/dist/icons/Award02Icon.jsx +0 -5
- package/dist/icons/BankIcon.jsx +0 -5
- package/dist/icons/Bell01Icon.jsx +0 -5
- package/dist/icons/BellRingIcon.jsx +0 -5
- package/dist/icons/CalendarIcon.jsx +0 -5
- package/dist/icons/Camera01Icon.jsx +0 -6
- package/dist/icons/CheckCircleBrokenIcon.jsx +0 -5
- package/dist/icons/CheckCircleIcon.jsx +0 -5
- package/dist/icons/CheckIcon.jsx +0 -5
- package/dist/icons/CheckVerified02Icon.jsx +0 -5
- package/dist/icons/ChevronDownIcon.jsx +0 -5
- package/dist/icons/ChevronLeftIcon.jsx +0 -5
- package/dist/icons/ChevronRightIcon.jsx +0 -5
- package/dist/icons/ChevronUpIcon.jsx +0 -5
- package/dist/icons/ClockStopWatchIcon.jsx +0 -5
- package/dist/icons/CoinsHandIcon.jsx +0 -5
- package/dist/icons/CoinsStacked02Icon.jsx +0 -5
- package/dist/icons/CoinsSwap02Icon.jsx +0 -5
- package/dist/icons/CreditCard02Icon.jsx +0 -5
- package/dist/icons/Diamond01Icon.jsx +0 -5
- package/dist/icons/Expand03Icon.jsx +0 -5
- package/dist/icons/EyeIcon.jsx +0 -6
- package/dist/icons/EyeOffIcon.jsx +0 -5
- package/dist/icons/FacebookIcon.jsx +0 -6
- package/dist/icons/File02Icon.jsx +0 -5
- package/dist/icons/FileCheck02Icon.jsx +0 -5
- package/dist/icons/Flag06Icon.jsx +0 -5
- package/dist/icons/Gift01Icon.jsx +0 -5
- package/dist/icons/GoogleIcon.jsx +0 -9
- package/dist/icons/HelpCircleIcon.jsx +0 -5
- package/dist/icons/InfoCircleIcon.jsx +0 -5
- package/dist/icons/Lock01Icon.jsx +0 -5
- package/dist/icons/Logout01Icon.jsx +0 -5
- package/dist/icons/MarkerPin06Icon.jsx +0 -5
- package/dist/icons/Menu01Icon.jsx +0 -5
- package/dist/icons/Menu03Icon.jsx +0 -5
- package/dist/icons/PiggyBank02Icon.jsx +0 -5
- package/dist/icons/QrCode02Icon.jsx +0 -5
- package/dist/icons/SearchLgIcon.jsx +0 -5
- package/dist/icons/SearchRefractionIcon.jsx +0 -5
- package/dist/icons/Settings02Icon.jsx +0 -6
- package/dist/icons/SpinnerIcon.jsx +0 -9
- package/dist/icons/Star01Icon.jsx +0 -5
- package/dist/icons/StarIcon.jsx +0 -5
- package/dist/icons/StopWatchIcon.jsx +0 -5
- package/dist/icons/Target04Icon.jsx +0 -5
- package/dist/icons/Trophy01Icon.jsx +0 -5
- package/dist/icons/UploadCloud02Icon.jsx +0 -5
- package/dist/icons/User01Icon.jsx +0 -5
- package/dist/icons/Wallet02Icon.jsx +0 -5
- package/dist/icons/XIcon.jsx +0 -5
- package/dist/ui/Badge/Badge.jsx +0 -11
- package/dist/ui/Presence.jsx +0 -6
- package/dist/ui/Prose.jsx +0 -4
- package/dist/utils/getLocaleInfo.jsx +0 -237
- /package/dist/components/AccountPaymentMethods/{AccountPaymentMethods.jsx → AccountPaymentMethods.js} +0 -0
- /package/dist/components/AccountVerification/{AccountVerification.jsx → AccountVerification.js} +0 -0
- /package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/{OnlineBankDepositContext.jsx → OnlineBankDepositContext.js} +0 -0
- /package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/{useOnlineBankDeposit.jsx → useOnlineBankDeposit.js} +0 -0
- /package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/{QRPHDepositContext.jsx → QRPHDepositContext.js} +0 -0
- /package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/{useQRPHDeposit.jsx → useQRPHDeposit.js} +0 -0
- /package/dist/components/Disclaimer/{useDisclaimer.jsx → useDisclaimer.js} +0 -0
- /package/dist/components/KYC/{KYCContext.jsx → KYCContext.js} +0 -0
- /package/dist/components/Protected/{Protected.jsx → Protected.js} +0 -0
- /package/dist/third-parties/FacebookPixel/{FacebookPixel.jsx → FacebookPixel.js} +0 -0
- /package/dist/third-parties/GoogleRecaptcha/{GoogleRecaptcha.jsx → GoogleRecaptcha.js} +0 -0
- /package/dist/ui/AlertDialog/{AlertDialog.jsx → AlertDialog.js} +0 -0
- /package/dist/ui/Avatar/{Avatar.jsx → Avatar.js} +0 -0
- /package/dist/ui/Checkbox/{Checkbox.jsx → Checkbox.js} +0 -0
- /package/dist/ui/Clipboard/{Clipboard.jsx → Clipboard.js} +0 -0
- /package/dist/ui/Collapsible/{Collapsible.jsx → Collapsible.js} +0 -0
- /package/dist/ui/Combobox/{Combobox.jsx → Combobox.js} +0 -0
- /package/dist/ui/DatePicker/{DatePicker.jsx → DatePicker.js} +0 -0
- /package/dist/ui/Dialog/{Dialog.jsx → Dialog.js} +0 -0
- /package/dist/ui/Drawer/{Drawer.jsx → Drawer.js} +0 -0
- /package/dist/ui/Field/{Field.jsx → Field.js} +0 -0
- /package/dist/ui/Menu/{Menu.jsx → Menu.js} +0 -0
- /package/dist/ui/NumberInput/{NumberInput.jsx → NumberInput.js} +0 -0
- /package/dist/ui/PasswordInput/{PasswordInput.jsx → PasswordInput.js} +0 -0
- /package/dist/ui/PinInput/{PinInput.jsx → PinInput.js} +0 -0
- /package/dist/ui/Popover/{Popover.jsx → Popover.js} +0 -0
- /package/dist/ui/Progress/{Progress.jsx → Progress.js} +0 -0
- /package/dist/ui/SegmentGroup/{SegmentGroup.jsx → SegmentGroup.js} +0 -0
- /package/dist/ui/Select/{Select.jsx → Select.js} +0 -0
- /package/dist/ui/Table/{Table.jsx → Table.js} +0 -0
- /package/dist/ui/Tabs/{Tabs.jsx → Tabs.js} +0 -0
- /package/dist/ui/Tooltip/{Tooltip.jsx → Tooltip.js} +0 -0
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
3
|
-
import Link from 'next/link';
|
|
4
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { usePromosQuery } from '../../client/hooks/index.js';
|
|
7
|
-
import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon, Gift01Icon, } from '../../icons/index.js';
|
|
8
|
-
import { Button } from '../../ui/index.js';
|
|
9
|
-
import { Empty } from '../Empty';
|
|
10
|
-
import { PromosItem } from './PromoItem';
|
|
11
|
-
export function PromoCarousel(props) {
|
|
12
|
-
const promosQuery = usePromosQuery({});
|
|
13
|
-
const promos = promosQuery.data || [];
|
|
14
|
-
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
15
|
-
align: 'start',
|
|
16
|
-
slidesToScroll: 1,
|
|
17
|
-
breakpoints: {
|
|
18
|
-
'(min-width: 1024px)': {
|
|
19
|
-
slidesToScroll: 3,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
const [prevBtnDisabled, setPrevBtnDisabled] = useState(true);
|
|
24
|
-
const [nextBtnDisabled, setNextBtnDisabled] = useState(true);
|
|
25
|
-
const onPrevButtonClick = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
|
|
26
|
-
const onNextButtonClick = useCallback(async () => {
|
|
27
|
-
emblaApi?.scrollNext();
|
|
28
|
-
}, [emblaApi]);
|
|
29
|
-
const onSelect = useCallback((emblaApi) => {
|
|
30
|
-
setPrevBtnDisabled(!emblaApi?.canScrollPrev());
|
|
31
|
-
setNextBtnDisabled(!emblaApi?.canScrollNext());
|
|
32
|
-
}, []);
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (!emblaApi)
|
|
35
|
-
return;
|
|
36
|
-
onSelect(emblaApi);
|
|
37
|
-
emblaApi.on('reInit', onSelect).on('select', onSelect);
|
|
38
|
-
}, [emblaApi, onSelect]);
|
|
39
|
-
return (<div className={props.className}>
|
|
40
|
-
<div className="flex items-center">
|
|
41
|
-
<h2 className="text-lg font-semibold">
|
|
42
|
-
{props.heading ?? 'Promotions'}
|
|
43
|
-
</h2>
|
|
44
|
-
<div className="grow"/>
|
|
45
|
-
<div className="flex items-center justify-center gap-xl">
|
|
46
|
-
<Link href={props.viewAllUrl ?? '/promos'} className="text-button-tertiary-fg flex gap-sm text-sm font-semibold">
|
|
47
|
-
See All
|
|
48
|
-
<ChevronRightIcon className="size-5 lg:hidden"/>
|
|
49
|
-
</Link>
|
|
50
|
-
<div className="hidden lg:flex">
|
|
51
|
-
<Button variant="outline" colorScheme="gray" className="rounded-r-none border-r-0" onClick={onPrevButtonClick} disabled={prevBtnDisabled} aria-label="Previous">
|
|
52
|
-
<ArrowLeftIcon className="size-5"/>
|
|
53
|
-
</Button>
|
|
54
|
-
<Button variant="outline" colorScheme="gray" className="rounded-l-none" onClick={onNextButtonClick} disabled={nextBtnDisabled} aria-label="Next">
|
|
55
|
-
<ArrowRightIcon className="size-5"/>
|
|
56
|
-
</Button>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
{promos.length <= 0 && (<Empty icon={Gift01Icon} title="No Promos" message="No promo is currently available." className="mt-8"/>)}
|
|
62
|
-
|
|
63
|
-
{promos.length >= 1 && (<div ref={emblaRef} className="relative mt-lg lg:overflow-hidden">
|
|
64
|
-
<div className={twMerge('grid auto-cols-[calc((100%-(0.375rem*2))/1)] grid-flow-col gap-sm lg:auto-cols-[calc((100%-(0.5rem*5))/3)] lg:gap-md')}>
|
|
65
|
-
{promos.map((promo) => (<PromosItem key={promo.id} promo={promo} shouldShowDescription={props.shouldShowDescription}/>))}
|
|
66
|
-
</div>
|
|
67
|
-
</div>)}
|
|
68
|
-
</div>);
|
|
69
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
import { usePromosQuery } from '../../client/hooks/index.js';
|
|
4
|
-
import { Gift01Icon } from '../../icons/index.js';
|
|
5
|
-
import { Empty } from '../Empty';
|
|
6
|
-
import { PromosItem } from './PromoItem';
|
|
7
|
-
export function PromoGrid(props) {
|
|
8
|
-
const promosQuery = usePromosQuery({});
|
|
9
|
-
const promos = promosQuery.data || [];
|
|
10
|
-
return (<div className={props.className}>
|
|
11
|
-
<div className="flex items-center">
|
|
12
|
-
<h2 className="text-lg font-semibold">{props.heading ?? 'Promos'}</h2>
|
|
13
|
-
<div className="grow"/>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
{promos.length <= 0 && (<Empty icon={Gift01Icon} title="No Promos" message="No promo is currently available." className="mt-lg"/>)}
|
|
17
|
-
|
|
18
|
-
{promos.length >= 1 && (<div className="relative mt-lg lg:overflow-hidden">
|
|
19
|
-
<div className={twMerge('grid grid-cols-1 gap-sm lg:grid-cols-3 lg:gap-md')}>
|
|
20
|
-
{promos.map((promo) => (<PromosItem key={promo.id} promo={promo} shouldShowDescription={props.shouldShowDescription}/>))}
|
|
21
|
-
</div>
|
|
22
|
-
</div>)}
|
|
23
|
-
</div>);
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Image from 'next/image';
|
|
2
|
-
import { useRouter } from 'next/navigation';
|
|
3
|
-
import { twJoin } from 'tailwind-merge';
|
|
4
|
-
import { Button } from '../../ui/index.js';
|
|
5
|
-
export function PromosItem(props) {
|
|
6
|
-
const { promo } = props;
|
|
7
|
-
const router = useRouter();
|
|
8
|
-
return (<div key={promo.id} className="border-gray-50 bg-accent-50 relative flex h-full flex-col rounded-md border">
|
|
9
|
-
{promo.banner.url && (<Image src={promo.banner.url} alt={promo.name} width={1200} height={500} priority className="aspect-[1200/500] w-full rounded-t-md object-cover"/>)}
|
|
10
|
-
<div className="flex flex-grow flex-col p-4">
|
|
11
|
-
<p className={twJoin('w-full text-xl font-bold', props.shouldShowDescription ? 'text-start' : 'text-center')}>
|
|
12
|
-
{promo.name}
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
|
-
{props.shouldShowDescription && promo.description && (<p className="text-gray-600 mb-2 line-clamp-2 w-full overflow-hidden text-start text-sm" dangerouslySetInnerHTML={{ __html: promo.description }}/>)}
|
|
16
|
-
|
|
17
|
-
<div className="mt-auto pt-4">
|
|
18
|
-
<Button className="w-full" variant="outline" onClick={() => router.push(`/promos/${promo.id}`)}>
|
|
19
|
-
Read More
|
|
20
|
-
</Button>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>);
|
|
24
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { CalendarIcon, ClockStopWatchIcon, InfoCircleIcon } from '../../../icons/index.js';
|
|
3
|
-
import { twMerge } from 'tailwind-merge';
|
|
4
|
-
import { Button } from '../../../ui/index.js';
|
|
5
|
-
import { useState } from 'react';
|
|
6
|
-
import { DailyCheckInQuestModal } from './DailyCheckInQuestModal';
|
|
7
|
-
export default function DailyCheckInQuest() {
|
|
8
|
-
const [showRules, setShowRules] = useState(false);
|
|
9
|
-
// dummy data
|
|
10
|
-
const dailyCheckedInData = [
|
|
11
|
-
{
|
|
12
|
-
day: 1,
|
|
13
|
-
reward: 0,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
day: 2,
|
|
17
|
-
reward: 0,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
day: 3,
|
|
21
|
-
reward: 5,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
day: 4,
|
|
25
|
-
reward: 0,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
day: 5,
|
|
29
|
-
reward: 10,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
day: 6,
|
|
33
|
-
reward: 0,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
day: 7,
|
|
37
|
-
reward: 20,
|
|
38
|
-
},
|
|
39
|
-
];
|
|
40
|
-
const checkedInDays = 4;
|
|
41
|
-
const totalDays = 7;
|
|
42
|
-
const progressPercent = (checkedInDays / totalDays) * 100;
|
|
43
|
-
return (<>
|
|
44
|
-
<DailyCheckInQuestModal modalState={{
|
|
45
|
-
isOpen: showRules,
|
|
46
|
-
setIsOpen: setShowRules,
|
|
47
|
-
}}/>
|
|
48
|
-
<div className="border-border-primary bg-bg-tertiary flex h-full w-full min-w-[343px] flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5">
|
|
49
|
-
<div className="flex flex-col space-y-2">
|
|
50
|
-
<div className="flex max-h-7.5 items-start justify-between">
|
|
51
|
-
<div className="border-utility-brand-200 bg-utility-brand-50 rounded-xs flex items-center space-x-1 border py-1 pl-2 pr-2.5">
|
|
52
|
-
<ClockStopWatchIcon className="text-brand-400"/>
|
|
53
|
-
<p className="text-utility-brand-700 text-sm font-medium">
|
|
54
|
-
6d:10h:11m:10s
|
|
55
|
-
</p>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<div role="button" className="rounded-xs bg-bg-primary border-border-secondary cursor-pointer border p-2" onClick={() => setShowRules((prev) => !prev)}>
|
|
59
|
-
<InfoCircleIcon className="text-text-disabled"/>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
<p className="text-xl font-semibold">Daily Check-In</p>
|
|
63
|
-
<p className="text-text-secondary-700 text-wrap text-sm font-normal">
|
|
64
|
-
Check in for 7 days in a row to earn a bonus, don’t miss a day to
|
|
65
|
-
keep your streak!
|
|
66
|
-
</p>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div className="flex w-full flex-col space-y-2">
|
|
70
|
-
<div className="grid grid-cols-7">
|
|
71
|
-
{dailyCheckedInData.map((item) => {
|
|
72
|
-
const reward = item.reward ? `+₱${item.reward}` : '-';
|
|
73
|
-
return (<div key={item.day} className={twMerge('flex items-center justify-center', item.day <= checkedInDays
|
|
74
|
-
? 'text-brand-400'
|
|
75
|
-
: 'text-text-secondary-700')}>
|
|
76
|
-
<p>{reward}</p>
|
|
77
|
-
</div>);
|
|
78
|
-
})}
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<div className="bg-bg-primary h-2 w-full overflow-hidden rounded-full">
|
|
82
|
-
<div className="bg-utility-brand-600 h-full rounded-full transition-all duration-300" style={{ width: `${progressPercent}%` }}/>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<div className="grid grid-cols-7">
|
|
86
|
-
{dailyCheckedInData.map((item) => (<div key={item.day} className="flex items-center justify-center">
|
|
87
|
-
<CalendarWithDayNumber key={item.day} day={item.day} currentCheckedInDays={checkedInDays}/>
|
|
88
|
-
</div>))}
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
<Button>Check-In</Button>
|
|
92
|
-
</div>
|
|
93
|
-
</>);
|
|
94
|
-
}
|
|
95
|
-
function CalendarWithDayNumber({ day, currentCheckedInDays, }) {
|
|
96
|
-
return (<div className={twMerge('group relative h-fit w-fit', day <= currentCheckedInDays
|
|
97
|
-
? 'text-brand-400'
|
|
98
|
-
: 'text-text-secondary-700')}>
|
|
99
|
-
<CalendarIcon />
|
|
100
|
-
<div className="absolute inset-0 mt-[4px] flex items-center justify-center text-2xs lg:mt-[2px]">
|
|
101
|
-
<p className="text-center">{day}</p>
|
|
102
|
-
</div>
|
|
103
|
-
</div>);
|
|
104
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Button, Dialog } from '../../../ui/index.js';
|
|
3
|
-
import { Portal } from '@ark-ui/react';
|
|
4
|
-
import { XIcon } from '../../../icons/index.js';
|
|
5
|
-
export function DailyCheckInQuestModal(props) {
|
|
6
|
-
return (<Dialog.Root lazyMount unmountOnExit open={props.modalState.isOpen} onOpenChange={({ open }) => props.modalState.setIsOpen(open)} closeOnEscape={false} closeOnInteractOutside={false}>
|
|
7
|
-
<Portal>
|
|
8
|
-
<Dialog.Backdrop className="!z-[calc(var(--z-dialog)+1)]"/>
|
|
9
|
-
<Dialog.Positioner className="!z-[calc(var(--z-dialog)+2)] flex items-center justify-center">
|
|
10
|
-
<Dialog.Content className="min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5">
|
|
11
|
-
<Dialog.CloseTrigger>
|
|
12
|
-
<XIcon />
|
|
13
|
-
</Dialog.CloseTrigger>
|
|
14
|
-
<div className="flex flex-col space-y-5">
|
|
15
|
-
<p className="text-text-primary-900 text-[18px] font-semibold">
|
|
16
|
-
Daily Check-In Rules
|
|
17
|
-
</p>
|
|
18
|
-
<ul className="text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal">
|
|
19
|
-
<li>Earn rewards just for checking in each day!</li>
|
|
20
|
-
<li>
|
|
21
|
-
Stay consistent to unlock special rewards on the 3rd, 5th, and
|
|
22
|
-
7th day.
|
|
23
|
-
</li>
|
|
24
|
-
<li>
|
|
25
|
-
Missing a day will reset your streak, starting again from Day
|
|
26
|
-
1.
|
|
27
|
-
</li>
|
|
28
|
-
<li>
|
|
29
|
-
Each check-in unlocks the next one on the following day.
|
|
30
|
-
</li>
|
|
31
|
-
<li>
|
|
32
|
-
Successfully check in for 7 consecutive days to complete the
|
|
33
|
-
quest and reset the cycle.
|
|
34
|
-
</li>
|
|
35
|
-
</ul>
|
|
36
|
-
</div>
|
|
37
|
-
<div className="pb-4 pt-6">
|
|
38
|
-
<Button onClick={() => props.modalState.setIsOpen(false)}>
|
|
39
|
-
Ok
|
|
40
|
-
</Button>
|
|
41
|
-
</div>
|
|
42
|
-
</Dialog.Content>
|
|
43
|
-
</Dialog.Positioner>
|
|
44
|
-
</Portal>
|
|
45
|
-
</Dialog.Root>);
|
|
46
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import DailyCheckInQuest from './DailyCheckInQuest/DailyCheckInQuest';
|
|
2
|
-
import WageringQuest from './WageringQuest/WageringQuest';
|
|
3
|
-
export function Quests() {
|
|
4
|
-
return (<div className="mt-6 flex w-full flex-col px-4 lg:px-0">
|
|
5
|
-
<h3 className="mb-3 text-lg">Quests</h3>
|
|
6
|
-
|
|
7
|
-
<div className="grid grid-cols-1 gap-3xl lg:grid-cols-3">
|
|
8
|
-
<DailyCheckInQuest />
|
|
9
|
-
<WageringQuest />
|
|
10
|
-
</div>
|
|
11
|
-
</div>);
|
|
12
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { ClockStopWatchIcon, InfoCircleIcon } from '../../../icons/index.js';
|
|
3
|
-
import { Button } from '../../../ui/index.js';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import { WageringQuestModal } from './WageringQuestModal';
|
|
6
|
-
export default function WageringQuest() {
|
|
7
|
-
const [showRules, setShowRules] = useState(false);
|
|
8
|
-
const totalBet = 200;
|
|
9
|
-
const targetBet = 500;
|
|
10
|
-
const progressPercent = (totalBet / targetBet) * 100;
|
|
11
|
-
return (<>
|
|
12
|
-
<WageringQuestModal modalState={{
|
|
13
|
-
isOpen: showRules,
|
|
14
|
-
setIsOpen: setShowRules,
|
|
15
|
-
}}/>
|
|
16
|
-
<div className="border-border-primary bg-bg-tertiary flex h-full w-full min-w-[343px] flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5">
|
|
17
|
-
<div className="flex flex-col space-y-2">
|
|
18
|
-
<div className="flex max-h-7.5 items-start justify-between">
|
|
19
|
-
<div className="border-utility-brand-200 bg-utility-brand-50 rounded-xs flex items-center space-x-1 border py-1 pl-2 pr-2.5">
|
|
20
|
-
<ClockStopWatchIcon className="text-brand-400"/>
|
|
21
|
-
<p className="text-utility-brand-700 text-sm font-medium">
|
|
22
|
-
6d:10h:11m:10s
|
|
23
|
-
</p>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div role="button" className="rounded-xs bg-bg-primary border-border-secondary cursor-pointer border p-2" onClick={() => setShowRules((prev) => !prev)}>
|
|
27
|
-
<InfoCircleIcon className="text-text-disabled"/>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
<p className="text-xl font-semibold">Slots - total bet of ₱500</p>
|
|
31
|
-
<p className="text-text-secondary-700 text-wrap text-sm font-normal">
|
|
32
|
-
Play any slot game and place a total of ₱500 in bets to claim your
|
|
33
|
-
reward!
|
|
34
|
-
</p>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<div className="flex w-full flex-col space-y-2">
|
|
38
|
-
<div className="text-text-primary-brand group flex items-center justify-between">
|
|
39
|
-
<p>Progress {progressPercent}%</p>
|
|
40
|
-
<p>
|
|
41
|
-
{totalBet}
|
|
42
|
-
<span className="text-text-quarterary-brand">/{targetBet}</span>
|
|
43
|
-
</p>
|
|
44
|
-
</div>
|
|
45
|
-
<div className="bg-bg-primary h-2 w-full overflow-hidden rounded-full">
|
|
46
|
-
<div className="bg-utility-brand-600 h-full rounded-full transition-all duration-300" style={{ width: `${progressPercent}%` }}/>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div className="flex h-full items-end">
|
|
50
|
-
<Button variant="solid" className="bg-button-secondary-bg border-bg-primary-hover border text-white">
|
|
51
|
-
<p>
|
|
52
|
-
Complete to get <span className="text-brand-400">₱50</span> bonus!
|
|
53
|
-
</p>
|
|
54
|
-
</Button>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</>);
|
|
58
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Button, Dialog } from '../../../ui/index.js';
|
|
3
|
-
import { Portal } from '@ark-ui/react';
|
|
4
|
-
import { XIcon } from '../../../icons/index.js';
|
|
5
|
-
export function WageringQuestModal(props) {
|
|
6
|
-
return (<Dialog.Root lazyMount unmountOnExit open={props.modalState.isOpen} onOpenChange={({ open }) => props.modalState.setIsOpen(open)} closeOnEscape={false} closeOnInteractOutside={false}>
|
|
7
|
-
<Portal>
|
|
8
|
-
<Dialog.Backdrop className="!z-[calc(var(--z-dialog)+1)]"/>
|
|
9
|
-
<Dialog.Positioner className="!z-[calc(var(--z-dialog)+2)] flex items-center justify-center">
|
|
10
|
-
<Dialog.Content className="min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5">
|
|
11
|
-
<Dialog.CloseTrigger>
|
|
12
|
-
<XIcon />
|
|
13
|
-
</Dialog.CloseTrigger>
|
|
14
|
-
<div className="flex flex-col space-y-5">
|
|
15
|
-
<p className="text-text-primary-900 text-[18px] font-semibold">
|
|
16
|
-
Slots - total bet Rules
|
|
17
|
-
</p>
|
|
18
|
-
<ul className="text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal">
|
|
19
|
-
<li>
|
|
20
|
-
Earn extra rewards just by playing Slots, every bet counts,
|
|
21
|
-
win or lose!
|
|
22
|
-
</li>
|
|
23
|
-
<li>
|
|
24
|
-
Reach the wagering requirement in bets to complete the quest
|
|
25
|
-
and claim your reward.
|
|
26
|
-
</li>
|
|
27
|
-
</ul>
|
|
28
|
-
</div>
|
|
29
|
-
<div className="pb-4 pt-6">
|
|
30
|
-
<Button onClick={() => props.modalState.setIsOpen(false)}>
|
|
31
|
-
Ok
|
|
32
|
-
</Button>
|
|
33
|
-
</div>
|
|
34
|
-
</Dialog.Content>
|
|
35
|
-
</Dialog.Positioner>
|
|
36
|
-
</Portal>
|
|
37
|
-
</Dialog.Root>);
|
|
38
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Portal } from '@ark-ui/react';
|
|
3
|
-
import Image, {} from 'next/image';
|
|
4
|
-
import { useShallow } from 'zustand/shallow';
|
|
5
|
-
import { useGlobalStore } from '../../client/hooks/index.js';
|
|
6
|
-
import { XIcon } from '../../icons/index.js';
|
|
7
|
-
import { Dialog } from '../../ui/index.js';
|
|
8
|
-
import { SignInForm } from './SignInForm';
|
|
9
|
-
export function SignIn(props) {
|
|
10
|
-
const signInStore = useGlobalStore(useShallow((popups) => popups.signIn));
|
|
11
|
-
return (<Dialog.Root open={signInStore.open} onOpenChange={(details) => {
|
|
12
|
-
signInStore.setOpen(details.open);
|
|
13
|
-
}} lazyMount unmountOnExit closeOnEscape={false} closeOnInteractOutside={false}>
|
|
14
|
-
<Portal>
|
|
15
|
-
<Dialog.Backdrop />
|
|
16
|
-
<Dialog.Positioner>
|
|
17
|
-
<Dialog.Content className="bg-bg-primary-alt mx-auto h-full w-full items-start p-3xl pb-4xl lg:h-auto lg:w-[400px] lg:rounded-xl">
|
|
18
|
-
<Dialog.CloseTrigger>
|
|
19
|
-
<XIcon />
|
|
20
|
-
</Dialog.CloseTrigger>
|
|
21
|
-
|
|
22
|
-
<Image src={props.logo} alt="" width={200} height={100} className="mx-auto h-auto w-[120px]" draggable={false}/>
|
|
23
|
-
|
|
24
|
-
<SignInForm />
|
|
25
|
-
</Dialog.Content>
|
|
26
|
-
</Dialog.Positioner>
|
|
27
|
-
</Portal>
|
|
28
|
-
</Dialog.Root>);
|
|
29
|
-
}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useDialogContext } from '@ark-ui/react';
|
|
3
|
-
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import { Controller, useForm } from 'react-hook-form';
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
import { useShallow } from 'zustand/shallow';
|
|
8
|
-
import { useCooldown, useGlobalStore, useLocaleInfo, useMobileNumberParser, useSendVerificationCodeMutation, useSignInMutation, } from '../../client/hooks/index.js';
|
|
9
|
-
import { toaster } from '../../client/utils/index.js';
|
|
10
|
-
import { ArrowLeftIcon, CheckIcon, FacebookIcon, GoogleIcon } from '../../icons/index.js';
|
|
11
|
-
import { Button, Checkbox, Field, PinInput } from '../../ui/index.js';
|
|
12
|
-
export function SignInForm() {
|
|
13
|
-
const [step, setStep] = useState(1);
|
|
14
|
-
const dialog = useDialogContext();
|
|
15
|
-
const signUpStore = useGlobalStore(useShallow((popups) => popups.signUp));
|
|
16
|
-
const signInMutation = useSignInMutation();
|
|
17
|
-
const sendVerificationCodeMutation = useSendVerificationCodeMutation();
|
|
18
|
-
const localeInfo = useLocaleInfo();
|
|
19
|
-
const mobileNumberParser = useMobileNumberParser();
|
|
20
|
-
const Step1Definition = z.object({
|
|
21
|
-
mobileNumber: z.string().superRefine((v, ctx) => {
|
|
22
|
-
if (!mobileNumberParser.validate(v)) {
|
|
23
|
-
ctx.addIssue({
|
|
24
|
-
code: z.ZodIssueCode.custom,
|
|
25
|
-
message: 'Invalid mobile number',
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}),
|
|
29
|
-
termsAccepted: z.boolean().superRefine((v, ctx) => {
|
|
30
|
-
if (!v) {
|
|
31
|
-
ctx.addIssue({
|
|
32
|
-
code: z.ZodIssueCode.custom,
|
|
33
|
-
message: 'You must accept the terms and conditions',
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}),
|
|
37
|
-
});
|
|
38
|
-
const Step2Definition = z.object({
|
|
39
|
-
verificationCode: z.array(z.string().min(1).max(1).trim()).min(6).max(6),
|
|
40
|
-
});
|
|
41
|
-
const step1Form = useForm({
|
|
42
|
-
resolver: zodResolver(Step1Definition),
|
|
43
|
-
defaultValues: {
|
|
44
|
-
mobileNumber: '',
|
|
45
|
-
termsAccepted: false,
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
const step2Form = useForm({
|
|
49
|
-
resolver: zodResolver(Step2Definition),
|
|
50
|
-
defaultValues: {
|
|
51
|
-
verificationCode: Array.from({ length: 6 }).fill(''),
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
const cooldown = useCooldown({
|
|
55
|
-
max: 60,
|
|
56
|
-
duration: 1000 * 60,
|
|
57
|
-
});
|
|
58
|
-
return (<>
|
|
59
|
-
{step === 1 && (<>
|
|
60
|
-
<h2 className="mt-xl text-center text-lg font-semibold">
|
|
61
|
-
Log in to your account
|
|
62
|
-
</h2>
|
|
63
|
-
<p className="text-text-secondary-700 mt-xs text-center text-sm">
|
|
64
|
-
Welcome back! Please enter your details.
|
|
65
|
-
</p>
|
|
66
|
-
|
|
67
|
-
<form className="mt-3xl" onSubmit={step1Form.handleSubmit(async (data) => {
|
|
68
|
-
try {
|
|
69
|
-
await sendVerificationCodeMutation.mutateAsync({
|
|
70
|
-
channel: 'SMS',
|
|
71
|
-
recipient: mobileNumberParser.format(data.mobileNumber),
|
|
72
|
-
strict: true,
|
|
73
|
-
});
|
|
74
|
-
setStep(2);
|
|
75
|
-
cooldown.start();
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
toaster.error({
|
|
79
|
-
description: e instanceof Error
|
|
80
|
-
? e.message
|
|
81
|
-
: 'Failed to send verification code',
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
})}>
|
|
85
|
-
<Field.Root invalid={!!step1Form.formState.errors.mobileNumber}>
|
|
86
|
-
<Field.Label>Mobile Number</Field.Label>
|
|
87
|
-
<div className="relative">
|
|
88
|
-
<localeInfo.country.flag className="absolute left-3.5 top-1/2 size-5 shrink-0 -translate-y-1/2"/>
|
|
89
|
-
<Field.Input className="pl-11" placeholder={`${localeInfo.mobileNumber.areaCode}${localeInfo.mobileNumber.example}`} {...step1Form.register('mobileNumber')}/>
|
|
90
|
-
</div>
|
|
91
|
-
<Field.ErrorText>
|
|
92
|
-
{step1Form.formState.errors.mobileNumber?.message}
|
|
93
|
-
</Field.ErrorText>
|
|
94
|
-
</Field.Root>
|
|
95
|
-
|
|
96
|
-
<Button type="submit" className="mt-3xl" disabled={step1Form.formState.isSubmitting}>
|
|
97
|
-
Log In
|
|
98
|
-
</Button>
|
|
99
|
-
|
|
100
|
-
<Controller control={step1Form.control} name="termsAccepted" render={(o) => (<Checkbox.Root className="mt-xl" invalid={o.fieldState.invalid} checked={o.field.value} onCheckedChange={(details) => {
|
|
101
|
-
o.field.onChange(details.checked);
|
|
102
|
-
}}>
|
|
103
|
-
<Checkbox.Control>
|
|
104
|
-
<Checkbox.Indicator asChild>
|
|
105
|
-
<CheckIcon />
|
|
106
|
-
</Checkbox.Indicator>
|
|
107
|
-
</Checkbox.Control>
|
|
108
|
-
<Checkbox.Label>
|
|
109
|
-
I am at least 21 years of age and I accept the{' '}
|
|
110
|
-
<span className="text-brand-400 whitespace-nowrap underline underline-offset-2">
|
|
111
|
-
Terms and Conditions.
|
|
112
|
-
</span>
|
|
113
|
-
</Checkbox.Label>
|
|
114
|
-
<Checkbox.HiddenInput />
|
|
115
|
-
</Checkbox.Root>)}/>
|
|
116
|
-
</form>
|
|
117
|
-
|
|
118
|
-
<div className="relative mt-6 text-center">
|
|
119
|
-
<hr className="-translte-y-1/2 text-text-tertiary-600/50 absolute top-1/2 w-full"/>
|
|
120
|
-
<span className="text-text-tertiary-600 bg-bg-primary-alt relative px-md text-center text-sm font-semibold">
|
|
121
|
-
Log in directly with
|
|
122
|
-
</span>
|
|
123
|
-
</div>
|
|
124
|
-
|
|
125
|
-
<div className="mt-6">
|
|
126
|
-
<Button variant="outline" colorScheme="gray" onClick={() => {
|
|
127
|
-
dialog.setOpen(false);
|
|
128
|
-
}} className="border-border-primary bg-bg-primary text-text-secondary-700">
|
|
129
|
-
<GoogleIcon className="size-6"/>
|
|
130
|
-
Continue with Google
|
|
131
|
-
</Button>
|
|
132
|
-
<Button variant="outline" colorScheme="gray" onClick={() => {
|
|
133
|
-
dialog.setOpen(false);
|
|
134
|
-
}} className="border-border-primary bg-bg-primary text-text-secondary-700 mt-lg">
|
|
135
|
-
<FacebookIcon className="size-6"/>
|
|
136
|
-
Continue with Facebook
|
|
137
|
-
</Button>
|
|
138
|
-
</div>
|
|
139
|
-
|
|
140
|
-
<div className="mt-6 flex w-full items-center justify-center gap-xs text-sm">
|
|
141
|
-
<span className="text-text-tertiary-600">
|
|
142
|
-
Don't have an account?
|
|
143
|
-
</span>
|
|
144
|
-
<button type="submit" className="text-button-tertiary-fg font-semibold" onClick={() => {
|
|
145
|
-
dialog.setOpen(false);
|
|
146
|
-
signUpStore.setOpen(true);
|
|
147
|
-
}}>
|
|
148
|
-
Sign up
|
|
149
|
-
</button>
|
|
150
|
-
</div>
|
|
151
|
-
</>)}
|
|
152
|
-
|
|
153
|
-
{step === 2 && (<>
|
|
154
|
-
<h2 className="mt-xl text-center text-lg font-semibold">
|
|
155
|
-
Check your Phone
|
|
156
|
-
</h2>
|
|
157
|
-
<p className="text-text-secondary-700 mt-xs text-center text-sm">
|
|
158
|
-
We’ve sent a verification code to your mobile number{' '}
|
|
159
|
-
<span className="font-semibold">
|
|
160
|
-
{mobileNumberParser.format(step1Form.getValues('mobileNumber'))}
|
|
161
|
-
</span>{' '}
|
|
162
|
-
via text
|
|
163
|
-
</p>
|
|
164
|
-
|
|
165
|
-
<form className="mt-5" onSubmit={step2Form.handleSubmit(async ({ verificationCode }) => {
|
|
166
|
-
const { mobileNumber } = step1Form.getValues();
|
|
167
|
-
try {
|
|
168
|
-
await signInMutation.mutateAsync({
|
|
169
|
-
type: 'MOBILE_NUMBER',
|
|
170
|
-
mobileNumber: mobileNumberParser.format(mobileNumber),
|
|
171
|
-
verificationCode: verificationCode.join(''),
|
|
172
|
-
});
|
|
173
|
-
dialog.setOpen(false);
|
|
174
|
-
step1Form.reset();
|
|
175
|
-
step2Form.reset();
|
|
176
|
-
setStep(1);
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
toaster.error({
|
|
180
|
-
description: 'Invalid Verification Code',
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
})}>
|
|
184
|
-
<Controller name="verificationCode" control={step2Form.control} render={(o) => (<PinInput.Root placeholder="0" invalid={o.fieldState.invalid} value={o.field.value} onValueChange={(details) => {
|
|
185
|
-
o.field.onChange(details.value);
|
|
186
|
-
}}>
|
|
187
|
-
<PinInput.Control className="grid-cols-[1fr_1fr_1fr_auto_1fr_1fr_1fr] items-center gap-md">
|
|
188
|
-
<PinInput.Input index={0}/>
|
|
189
|
-
<PinInput.Input index={1}/>
|
|
190
|
-
<PinInput.Input index={2}/>
|
|
191
|
-
<span className="text-text-placeholder-subtle text-2xl font-medium">
|
|
192
|
-
–
|
|
193
|
-
</span>
|
|
194
|
-
<PinInput.Input index={3}/>
|
|
195
|
-
<PinInput.Input index={4}/>
|
|
196
|
-
<PinInput.Input index={5}/>
|
|
197
|
-
</PinInput.Control>
|
|
198
|
-
<PinInput.HiddenInput />
|
|
199
|
-
</PinInput.Root>)}/>
|
|
200
|
-
|
|
201
|
-
<Button type="submit" className="mt-4xl" disabled={step2Form.formState.isSubmitting}>
|
|
202
|
-
Verify
|
|
203
|
-
</Button>
|
|
204
|
-
|
|
205
|
-
<div className="mt-3 flex w-full items-center justify-center gap-xs text-sm">
|
|
206
|
-
<span className="text-text-secondary-700">
|
|
207
|
-
Didn't recieve the code?
|
|
208
|
-
</span>
|
|
209
|
-
<button type="button" className="text-button-secondary-fg font-semibold" disabled={cooldown.cooling} onClick={async () => {
|
|
210
|
-
await sendVerificationCodeMutation.mutateAsync({
|
|
211
|
-
channel: 'SMS',
|
|
212
|
-
recipient: mobileNumberParser.format(step1Form.getValues('mobileNumber')),
|
|
213
|
-
});
|
|
214
|
-
cooldown.start();
|
|
215
|
-
}}>
|
|
216
|
-
{cooldown.cooling
|
|
217
|
-
? `Resend in ${cooldown.countdown}s`
|
|
218
|
-
: 'Resend'}
|
|
219
|
-
</button>
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
<button type="button" className="text-text-tertiary-600 mx-auto mt-3xl flex w-fit items-center gap-1 text-sm font-semibold" onClick={() => {
|
|
223
|
-
setStep(1);
|
|
224
|
-
step2Form.reset();
|
|
225
|
-
cooldown.stop();
|
|
226
|
-
}}>
|
|
227
|
-
<ArrowLeftIcon className="size-5"/>
|
|
228
|
-
Back
|
|
229
|
-
</button>
|
|
230
|
-
</form>
|
|
231
|
-
</>)}
|
|
232
|
-
</>);
|
|
233
|
-
}
|