@opexa/portal-components 0.0.63 → 0.0.65
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/components/Bonuses/Bonuses.client.js +4 -4
- package/dist/components/Bonuses/BonusesTrigger.d.ts +5 -0
- package/dist/components/Bonuses/BonusesTrigger.js +19 -0
- package/dist/components/Bonuses/index.d.ts +1 -0
- package/dist/components/Bonuses/index.js +2 -1
- package/package.json +1 -1
- package/dist/components/Account/Account.d.ts +0 -23
- package/dist/components/Account/Account.js +0 -107
- package/dist/components/Account/AccountTrigger.d.ts +0 -6
- package/dist/components/Account/AccountTrigger.js +0 -13
- package/dist/components/Account/account.recipe.d.ts +0 -61
- package/dist/components/Account/account.recipe.js +0 -32
- package/dist/components/Account/index.d.ts +0 -2
- package/dist/components/Account/index.js +0 -2
- package/dist/components/AccountInfo/AccountInfo.d.ts +0 -4
- package/dist/components/AccountInfo/AccountInfo.js +0 -143
- package/dist/components/AccountInfo/index.d.ts +0 -1
- package/dist/components/AccountInfo/index.js +0 -1
- package/dist/components/AccountSecurity/AccountSecurity.d.ts +0 -4
- package/dist/components/AccountSecurity/AccountSecurity.js +0 -171
- package/dist/components/AccountSecurity/index.d.ts +0 -1
- package/dist/components/AccountSecurity/index.js +0 -1
- package/dist/components/AccountVerification/AccountVerification.d.ts +0 -4
- package/dist/components/AccountVerification/AccountVerification.js +0 -37
- package/dist/components/AccountVerification/index.d.ts +0 -1
- package/dist/components/AccountVerification/index.js +0 -1
- package/dist/components/Banner/Banner.d.ts +0 -11
- package/dist/components/Banner/Banner.js +0 -38
- package/dist/components/Banner/index.d.ts +0 -1
- package/dist/components/Banner/index.js +0 -1
- package/dist/components/BetRecords/BetRecords.d.ts +0 -7
- package/dist/components/BetRecords/BetRecords.js +0 -181
- package/dist/components/BetRecords/index.d.ts +0 -1
- package/dist/components/BetRecords/index.js +0 -1
- package/dist/components/Bonus/Bonus.client.d.ts +0 -2
- package/dist/components/Bonus/Bonus.client.js +0 -9
- package/dist/components/Bonus/Bonus.d.ts +0 -10
- package/dist/components/Bonus/Bonus.js +0 -5
- package/dist/components/Bonus/index.d.ts +0 -1
- package/dist/components/Bonus/index.js +0 -1
- package/dist/components/Bonuses/Bonuses.d.ts +0 -15
- package/dist/components/Bonuses/Bonuses.js +0 -7
- package/dist/components/Cashback/Cashback.client.d.ts +0 -2
- package/dist/components/Cashback/Cashback.client.js +0 -27
- package/dist/components/Cashback/Cashback.d.ts +0 -7
- package/dist/components/Cashback/Cashback.js +0 -15
- package/dist/components/Cashback/index.d.ts +0 -1
- package/dist/components/Cashback/index.js +0 -1
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +0 -2
- package/dist/components/CashbackBonus/CashbackBonus.client.js +0 -9
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +0 -10
- package/dist/components/CashbackBonus/CashbackBonus.js +0 -5
- package/dist/components/CashbackBonus/index.d.ts +0 -1
- package/dist/components/CashbackBonus/index.js +0 -1
- package/dist/components/DepositWithdrawal/AmountChoices.d.ts +0 -11
- package/dist/components/DepositWithdrawal/AmountChoices.js +0 -25
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.d.ts +0 -8
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +0 -31
- package/dist/components/DepositWithdrawal/Deposit/Deposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +0 -75
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +0 -129
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +0 -126
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +0 -129
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.js +0 -96
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +0 -21
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +0 -16
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +0 -102
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +0 -60
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +0 -96
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +0 -21
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +0 -16
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +0 -101
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +0 -60
- package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +0 -6
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +0 -39
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +0 -5
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +0 -21
- package/dist/components/DepositWithdrawal/PaymentMethods.d.ts +0 -10
- package/dist/components/DepositWithdrawal/PaymentMethods.js +0 -60
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +0 -109
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +0 -131
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +0 -101
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +0 -109
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +0 -91
- package/dist/components/DepositWithdrawal/index.d.ts +0 -1
- package/dist/components/DepositWithdrawal/index.js +0 -1
- package/dist/components/DepositWithdrawal/utils.d.ts +0 -3
- package/dist/components/DepositWithdrawal/utils.js +0 -9
- package/dist/components/Disclaimer/Disclaimer.d.ts +0 -5
- package/dist/components/Disclaimer/Disclaimer.js +0 -14
- package/dist/components/Disclaimer/index.d.ts +0 -1
- package/dist/components/Disclaimer/index.js +0 -1
- package/dist/components/Disclaimer/useDisclaimer.d.ts +0 -4
- package/dist/components/Disclaimer/useDisclaimer.js +0 -37
- package/dist/components/Empty.d.ts +0 -10
- package/dist/components/Empty.js +0 -7
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +0 -2
- package/dist/components/FavoriteGames/FavoriteGames.client.js +0 -31
- package/dist/components/FavoriteGames/FavoriteGames.d.ts +0 -6
- package/dist/components/FavoriteGames/FavoriteGames.js +0 -7
- package/dist/components/FavoriteGames/index.d.ts +0 -1
- package/dist/components/FavoriteGames/index.js +0 -1
- package/dist/components/GameLaunch/GameLaunch.d.ts +0 -1
- package/dist/components/GameLaunch/GameLaunch.js +0 -75
- package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +0 -7
- package/dist/components/GameLaunch/GameLaunchTrigger.js +0 -57
- package/dist/components/GameLaunch/index.d.ts +0 -2
- package/dist/components/GameLaunch/index.js +0 -2
- package/dist/components/GameProviders/GameProviders.d.ts +0 -11
- package/dist/components/GameProviders/GameProviders.js +0 -32
- package/dist/components/GameProviders/index.d.ts +0 -1
- package/dist/components/GameProviders/index.js +0 -1
- package/dist/components/Games/BadgeNew.d.ts +0 -2
- package/dist/components/Games/BadgeNew.js +0 -4
- package/dist/components/Games/BadgePopular.d.ts +0 -2
- package/dist/components/Games/BadgePopular.js +0 -4
- package/dist/components/Games/BadgeTop.d.ts +0 -2
- package/dist/components/Games/BadgeTop.js +0 -4
- package/dist/components/Games/Game.d.ts +0 -4
- package/dist/components/Games/Game.js +0 -37
- package/dist/components/Games/GameContext.d.ts +0 -2
- package/dist/components/Games/GameContext.js +0 -2
- package/dist/components/Games/Games.d.ts +0 -8
- package/dist/components/Games/Games.js +0 -6
- package/dist/components/Games/GamesCarousel.client.d.ts +0 -2
- package/dist/components/Games/GamesCarousel.client.js +0 -58
- package/dist/components/Games/GamesCarousel.d.ts +0 -16
- package/dist/components/Games/GamesCarousel.js +0 -11
- package/dist/components/Games/GamesList.client.d.ts +0 -2
- package/dist/components/Games/GamesList.client.js +0 -14
- package/dist/components/Games/GamesList.d.ts +0 -11
- package/dist/components/Games/GamesList.js +0 -10
- package/dist/components/Games/index.d.ts +0 -1
- package/dist/components/Games/index.js +0 -1
- package/dist/components/GamesSearch/GamesSearch.d.ts +0 -8
- package/dist/components/GamesSearch/GamesSearch.js +0 -45
- package/dist/components/GamesSearch/index.d.ts +0 -1
- package/dist/components/GamesSearch/index.js +0 -1
- package/dist/components/InfiniteScroll.d.ts +0 -10
- package/dist/components/InfiniteScroll.js +0 -25
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
- package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -57
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -8
- package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -8
- package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -103
- package/dist/components/JackpotCounter/index.d.ts +0 -1
- package/dist/components/JackpotCounter/index.js +0 -1
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
- package/dist/components/Jackpots/JackpotGameProviders.js +0 -38
- package/dist/components/Jackpots/JackpotItemDesktop.d.ts +0 -9
- package/dist/components/Jackpots/JackpotItemDesktop.js +0 -43
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +0 -9
- package/dist/components/Jackpots/JackpotItemMobile.js +0 -44
- package/dist/components/Jackpots/JackpotRules.d.ts +0 -6
- package/dist/components/Jackpots/JackpotRules.js +0 -9
- package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
- package/dist/components/Jackpots/Jackpots.client.js +0 -28
- package/dist/components/Jackpots/Jackpots.d.ts +0 -10
- package/dist/components/Jackpots/Jackpots.js +0 -21
- package/dist/components/Jackpots/index.d.ts +0 -1
- package/dist/components/Jackpots/index.js +0 -1
- package/dist/components/Jackpots/useJackpotItemData.d.ts +0 -20
- package/dist/components/Jackpots/useJackpotItemData.js +0 -87
- package/dist/components/KYC/Header.d.ts +0 -1
- package/dist/components/KYC/Header.js +0 -6
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -9
- package/dist/components/KYC/KYC.d.ts +0 -1
- package/dist/components/KYC/KYC.js +0 -26
- package/dist/components/KYC/KYCContext.d.ts +0 -2
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/KYCTrigger.d.ts +0 -5
- package/dist/components/KYC/KYCTrigger.js +0 -14
- package/dist/components/KYC/Step1.d.ts +0 -1
- package/dist/components/KYC/Step1.js +0 -12
- package/dist/components/KYC/Step2.d.ts +0 -1
- package/dist/components/KYC/Step2.js +0 -12
- package/dist/components/KYC/Step3.d.ts +0 -1
- package/dist/components/KYC/Step3.js +0 -11
- package/dist/components/KYC/Step4.d.ts +0 -1
- package/dist/components/KYC/Step4.js +0 -6
- package/dist/components/KYC/index.d.ts +0 -2
- package/dist/components/KYC/index.js +0 -2
- package/dist/components/KYC/useKYC.d.ts +0 -10
- package/dist/components/KYC/useKYC.js +0 -8
- package/dist/components/Marquee/Marquee.d.ts +0 -5
- package/dist/components/Marquee/Marquee.js +0 -5
- package/dist/components/Marquee/index.d.ts +0 -1
- package/dist/components/Marquee/index.js +0 -1
- package/dist/components/Messages/MessageItem.d.ts +0 -4
- package/dist/components/Messages/MessageItem.js +0 -34
- package/dist/components/Messages/MessagePopup.d.ts +0 -1
- package/dist/components/Messages/MessagePopup.js +0 -20
- package/dist/components/Messages/MessageTrigger.d.ts +0 -8
- package/dist/components/Messages/MessageTrigger.js +0 -18
- package/dist/components/Messages/Messages.d.ts +0 -14
- package/dist/components/Messages/Messages.js +0 -38
- package/dist/components/Messages/MessagesTrigger.d.ts +0 -6
- package/dist/components/Messages/MessagesTrigger.js +0 -14
- package/dist/components/Messages/index.d.ts +0 -4
- package/dist/components/Messages/index.js +0 -4
- package/dist/components/Messages/utils.d.ts +0 -3
- package/dist/components/Messages/utils.js +0 -27
- package/dist/components/PortalProvider/PortalProvider.d.ts +0 -9
- package/dist/components/PortalProvider/PortalProvider.js +0 -18
- package/dist/components/PortalProvider/Providers.d.ts +0 -4
- package/dist/components/PortalProvider/Providers.js +0 -12
- package/dist/components/PortalProvider/Snackbar.d.ts +0 -1
- package/dist/components/PortalProvider/Snackbar.js +0 -21
- package/dist/components/PortalProvider/WebVitals.d.ts +0 -1
- package/dist/components/PortalProvider/WebVitals.js +0 -8
- package/dist/components/PortalProvider/index.d.ts +0 -1
- package/dist/components/PortalProvider/index.js +0 -1
- package/dist/components/Promo/Promo.client.d.ts +0 -2
- package/dist/components/Promo/Promo.client.js +0 -27
- package/dist/components/Promo/Promo.d.ts +0 -7
- package/dist/components/Promo/Promo.js +0 -15
- package/dist/components/Promo/index.d.ts +0 -1
- package/dist/components/Promo/index.js +0 -1
- package/dist/components/Promos/Cashback.d.ts +0 -7
- package/dist/components/Promos/Cashback.js +0 -17
- package/dist/components/Promos/Promo.d.ts +0 -7
- package/dist/components/Promos/Promo.js +0 -17
- package/dist/components/Promos/Promos.d.ts +0 -15
- package/dist/components/Promos/Promos.js +0 -13
- package/dist/components/Promos/PromosCarousel.d.ts +0 -2
- package/dist/components/Promos/PromosCarousel.js +0 -45
- package/dist/components/Promos/PromosGrid.d.ts +0 -2
- package/dist/components/Promos/PromosGrid.js +0 -16
- package/dist/components/Promos/index.d.ts +0 -1
- package/dist/components/Promos/index.js +0 -1
- package/dist/components/Protected/Protected.d.ts +0 -6
- package/dist/components/Protected/Protected.js +0 -8
- package/dist/components/Protected/index.d.ts +0 -1
- package/dist/components/Protected/index.js +0 -1
- package/dist/components/Quests/CountdownTimer.d.ts +0 -15
- package/dist/components/Quests/CountdownTimer.js +0 -33
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -73
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -8
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
- package/dist/components/Quests/Quests.client.d.ts +0 -2
- package/dist/components/Quests/Quests.client.js +0 -27
- package/dist/components/Quests/Quests.d.ts +0 -6
- package/dist/components/Quests/Quests.js +0 -7
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -19
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -8
- package/dist/components/Quests/index.d.ts +0 -1
- package/dist/components/Quests/index.js +0 -1
- package/dist/components/Search/Search.d.ts +0 -6
- package/dist/components/Search/Search.js +0 -38
- package/dist/components/Search/SearchTrigger.d.ts +0 -5
- package/dist/components/Search/SearchTrigger.js +0 -14
- package/dist/components/Search/index.d.ts +0 -2
- package/dist/components/Search/index.js +0 -2
- package/dist/components/SignIn/MobileNumberSignIn.d.ts +0 -1
- package/dist/components/SignIn/MobileNumberSignIn.js +0 -121
- package/dist/components/SignIn/NameAndPasswordSignIn.d.ts +0 -1
- package/dist/components/SignIn/NameAndPasswordSignIn.js +0 -116
- package/dist/components/SignIn/SignIn.d.ts +0 -7
- package/dist/components/SignIn/SignIn.js +0 -18
- package/dist/components/SignIn/SignInContext.d.ts +0 -2
- package/dist/components/SignIn/SignInContext.js +0 -2
- package/dist/components/SignIn/SignInForm.d.ts +0 -1
- package/dist/components/SignIn/SignInForm.js +0 -10
- package/dist/components/SignIn/SignInMethod.d.ts +0 -1
- package/dist/components/SignIn/SignInMethod.js +0 -19
- package/dist/components/SignIn/SignInTrigger.d.ts +0 -6
- package/dist/components/SignIn/SignInTrigger.js +0 -14
- package/dist/components/SignIn/index.d.ts +0 -2
- package/dist/components/SignIn/index.js +0 -2
- package/dist/components/SignIn/useSignIn.d.ts +0 -10
- package/dist/components/SignIn/useSignIn.js +0 -11
- package/dist/components/SignUp/SignUp.d.ts +0 -7
- package/dist/components/SignUp/SignUp.js +0 -16
- package/dist/components/SignUp/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpForm.js +0 -133
- package/dist/components/SignUp/SignUpTrigger.d.ts +0 -6
- package/dist/components/SignUp/SignUpTrigger.js +0 -14
- package/dist/components/SignUp/index.d.ts +0 -2
- package/dist/components/SignUp/index.js +0 -2
- package/dist/components/TopWins/TopWins.client.d.ts +0 -2
- package/dist/components/TopWins/TopWins.client.js +0 -23
- package/dist/components/TopWins/TopWins.d.ts +0 -6
- package/dist/components/TopWins/TopWins.js +0 -7
- package/dist/components/TopWins/index.d.ts +0 -1
- package/dist/components/TopWins/index.js +0 -1
- package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +0 -2
- package/dist/components/TournamentCounter/TournamentCounter.client.js +0 -50
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +0 -8
- package/dist/components/TournamentCounter/TournamentCounter.js +0 -21
- package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +0 -8
- package/dist/components/TournamentCounter/TournamentCounterItem.js +0 -106
- package/dist/components/TournamentCounter/index.d.ts +0 -1
- package/dist/components/TournamentCounter/index.js +0 -1
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +0 -5
- package/dist/components/Tournaments/TournamentGameProviders.js +0 -38
- package/dist/components/Tournaments/TournamentItemDesktop.d.ts +0 -7
- package/dist/components/Tournaments/TournamentItemDesktop.js +0 -56
- package/dist/components/Tournaments/TournamentItemMobile.d.ts +0 -7
- package/dist/components/Tournaments/TournamentItemMobile.js +0 -54
- package/dist/components/Tournaments/TournamentRules.d.ts +0 -6
- package/dist/components/Tournaments/TournamentRules.js +0 -9
- package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
- package/dist/components/Tournaments/Tournaments.client.js +0 -19
- package/dist/components/Tournaments/Tournaments.d.ts +0 -10
- package/dist/components/Tournaments/Tournaments.js +0 -14
- package/dist/components/Tournaments/index.d.ts +0 -1
- package/dist/components/Tournaments/index.js +0 -1
- package/dist/components/Tournaments/useTournamentItemData.d.ts +0 -16
- package/dist/components/Tournaments/useTournamentItemData.js +0 -64
- package/dist/components/TransactionRecords/DepositRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +0 -76
- package/dist/components/TransactionRecords/TableFilters.d.ts +0 -28
- package/dist/components/TransactionRecords/TableFilters.js +0 -212
- package/dist/components/TransactionRecords/TransactionRecords.d.ts +0 -7
- package/dist/components/TransactionRecords/TransactionRecords.js +0 -9
- package/dist/components/TransactionRecords/TransactionRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +0 -51
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +0 -70
- package/dist/components/TransactionRecords/index.d.ts +0 -1
- package/dist/components/TransactionRecords/index.js +0 -1
- package/dist/components/index.js +0 -34
- /package/dist/{components/Bonuses → images}/money-on-hand.png +0 -0
- /package/dist/{components/Bonuses → images}/piggy-bank.png +0 -0
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { prefetchCashbacksQuery, prefetchPromosQuery, } from '../../server/utils/index.js';
|
|
3
|
-
import { PromosCarousel } from './PromosCarousel.js';
|
|
4
|
-
import { PromosGrid } from './PromosGrid.js';
|
|
5
|
-
export async function Promos(props) {
|
|
6
|
-
await Promise.all([prefetchPromosQuery(), prefetchCashbacksQuery()]);
|
|
7
|
-
if (props.layout === 'grid') {
|
|
8
|
-
return _jsx(PromosGrid, { ...props });
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return _jsx(PromosCarousel, { ...props });
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
6
|
-
import { twMerge } from 'tailwind-merge';
|
|
7
|
-
import { useCashbacksQuery, usePromosQuery } from '../../client/hooks/index.js';
|
|
8
|
-
import { ArrowLeftIcon, ArrowRightIcon, ChevronRightIcon, Gift01Icon, } from '../../icons/index.js';
|
|
9
|
-
import { Button } from '../../ui/index.js';
|
|
10
|
-
import { Empty } from '../Empty.js';
|
|
11
|
-
import { Cashback } from './Cashback.js';
|
|
12
|
-
import { Promo } from './Promo.js';
|
|
13
|
-
export function PromosCarousel(props) {
|
|
14
|
-
const promosQuery = usePromosQuery();
|
|
15
|
-
const cashbacksQuery = useCashbacksQuery();
|
|
16
|
-
const promos = promosQuery.data ?? [];
|
|
17
|
-
const cashbacks = cashbacksQuery.data ?? [];
|
|
18
|
-
const empty = promos.length <= 0 && cashbacks.length <= 0;
|
|
19
|
-
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
20
|
-
align: 'start',
|
|
21
|
-
slidesToScroll: 1,
|
|
22
|
-
breakpoints: {
|
|
23
|
-
'(min-width: 1024px)': {
|
|
24
|
-
slidesToScroll: 3,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
const [prevBtnDisabled, setPrevBtnDisabled] = useState(true);
|
|
29
|
-
const [nextBtnDisabled, setNextBtnDisabled] = useState(true);
|
|
30
|
-
const onPrevButtonClick = useCallback(() => emblaApi?.scrollPrev(), [emblaApi]);
|
|
31
|
-
const onNextButtonClick = useCallback(async () => {
|
|
32
|
-
emblaApi?.scrollNext();
|
|
33
|
-
}, [emblaApi]);
|
|
34
|
-
const onSelect = useCallback((emblaApi) => {
|
|
35
|
-
setPrevBtnDisabled(!emblaApi?.canScrollPrev());
|
|
36
|
-
setNextBtnDisabled(!emblaApi?.canScrollNext());
|
|
37
|
-
}, []);
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
if (!emblaApi)
|
|
40
|
-
return;
|
|
41
|
-
onSelect(emblaApi);
|
|
42
|
-
emblaApi.on('reInit', onSelect).on('select', onSelect);
|
|
43
|
-
}, [emblaApi, onSelect]);
|
|
44
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Promotions' }), _jsx("div", { className: "grow" }), _jsxs("div", { className: "flex items-center justify-center gap-xl", children: [_jsxs(Link, { href: props.viewAllUrl ?? '/promos', className: "text-button-tertiary-fg flex gap-sm text-sm font-semibold", children: ["See All", _jsx(ChevronRightIcon, { className: "size-5 lg:hidden" })] }), _jsxs("div", { className: "hidden lg:flex", children: [_jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-r-none border-r-0", onClick: onPrevButtonClick, disabled: prevBtnDisabled, "aria-label": "Previous", children: _jsx(ArrowLeftIcon, { className: "size-5" }) }), _jsx(Button, { variant: "outline", colorScheme: "gray", className: "rounded-l-none", onClick: onNextButtonClick, disabled: nextBtnDisabled, "aria-label": "Next", children: _jsx(ArrowRightIcon, { className: "size-5" }) })] })] })] }), empty && (_jsx(Empty, { icon: Gift01Icon, title: "No Promos", message: "No promo is currently available.", className: "mt-8" })), !empty && (_jsx(_Fragment, { children: _jsx("div", { ref: emblaRef, className: "relative mt-lg lg:overflow-hidden", children: _jsxs("div", { className: twMerge('grid auto-cols-[100%] grid-flow-col gap-1.5 lg:auto-cols-[calc((100%-(1.25rem*2))/3)] lg:gap-2xl'), children: [promos.map((promo) => (_jsx(Promo, { data: promo, viewDetailsUrl: props.viewPromoDetailsUrl ?? '/promos' }, promo.id))), cashbacks.map((cashback) => (_jsx(Cashback, { data: cashback, viewDetailsUrl: props.viewCashbackDetailsUrl ?? '/promos/cashback' }, cashback.id)))] }) }) }))] }));
|
|
45
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCashbacksQuery, usePromosQuery } from '../../client/hooks/index.js';
|
|
4
|
-
import { Cashback } from './Cashback.js';
|
|
5
|
-
import { Promo } from './Promo.js';
|
|
6
|
-
export function PromosGrid(props) {
|
|
7
|
-
const promosQuery = usePromosQuery();
|
|
8
|
-
const cashbacksQuery = useCashbacksQuery();
|
|
9
|
-
const promos = promosQuery.data ?? [];
|
|
10
|
-
const cashbacks = cashbacksQuery.data ?? [];
|
|
11
|
-
const empty = promos.length <= 0 && cashbacks.length <= 0;
|
|
12
|
-
if (empty) {
|
|
13
|
-
return (_jsx("div", { className: props.className, children: _jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Promos' }), _jsx("div", { className: "grow" })] }) }));
|
|
14
|
-
}
|
|
15
|
-
return (_jsxs("div", { className: props.className, children: [_jsxs("div", { className: "flex items-center", children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Promos' }), _jsx("div", { className: "grow" })] }), _jsx("div", { className: "relative mt-lg lg:overflow-hidden", children: _jsxs("div", { className: "grid gap-3xl lg:grid-cols-3 lg:gap-2xl", children: [promos.map((promo) => (_jsx(Promo, { data: promo, viewDetailsUrl: props.viewPromoDetailsUrl ?? '/promos' }, promo.id))), cashbacks.map((cashback) => (_jsx(Cashback, { data: cashback, viewDetailsUrl: props.viewCashbackDetailsUrl ?? '/promos/cashback' }, cashback.id)))] }) })] }));
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Promos';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Promos.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Protected';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Protected.js';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
type TimeLeft = {
|
|
3
|
-
days: number;
|
|
4
|
-
hours: number;
|
|
5
|
-
minutes: number;
|
|
6
|
-
seconds: number;
|
|
7
|
-
};
|
|
8
|
-
interface CountdownTimerProps {
|
|
9
|
-
startDateTime?: string;
|
|
10
|
-
endDateTime?: string;
|
|
11
|
-
renderAction: (timeLeft: TimeLeft) => ReactNode;
|
|
12
|
-
onEnd?: () => void;
|
|
13
|
-
}
|
|
14
|
-
export default function CountdownTimer({ startDateTime, endDateTime, renderAction, onEnd, }: CountdownTimerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { differenceInSeconds, parseISO } from 'date-fns';
|
|
4
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
5
|
-
export default function CountdownTimer({ startDateTime, endDateTime, renderAction, onEnd, }) {
|
|
6
|
-
const calculateTimeLeft = useCallback(() => {
|
|
7
|
-
const start = startDateTime ? parseISO(startDateTime) : new Date();
|
|
8
|
-
const end = endDateTime ? parseISO(endDateTime) : new Date();
|
|
9
|
-
const totalSeconds = Math.max(differenceInSeconds(end, start), 0);
|
|
10
|
-
const days = Math.floor(totalSeconds / (60 * 60 * 24));
|
|
11
|
-
const hours = Math.floor((totalSeconds % (60 * 60 * 24)) / (60 * 60));
|
|
12
|
-
const minutes = Math.floor((totalSeconds % (60 * 60)) / 60);
|
|
13
|
-
const seconds = totalSeconds % 60;
|
|
14
|
-
return { days, hours, minutes, seconds };
|
|
15
|
-
}, [startDateTime, endDateTime]);
|
|
16
|
-
const [timeLeft, setTimeLeft] = useState(calculateTimeLeft);
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
const interval = setInterval(() => {
|
|
19
|
-
const newTimeLeft = calculateTimeLeft();
|
|
20
|
-
setTimeLeft(newTimeLeft);
|
|
21
|
-
const isZero = newTimeLeft.days === 0 &&
|
|
22
|
-
newTimeLeft.hours === 0 &&
|
|
23
|
-
newTimeLeft.minutes === 0 &&
|
|
24
|
-
newTimeLeft.seconds === 0;
|
|
25
|
-
if (isZero) {
|
|
26
|
-
clearInterval(interval);
|
|
27
|
-
onEnd?.();
|
|
28
|
-
}
|
|
29
|
-
}, 1000);
|
|
30
|
-
return () => clearInterval(interval);
|
|
31
|
-
}, [calculateTimeLeft, onEnd]);
|
|
32
|
-
return _jsx(_Fragment, { children: renderAction(timeLeft) });
|
|
33
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { addDays, isEqual, startOfDay } from 'date-fns';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { useCheckInDailyCheckInQuestMutation } from '../../../client/hooks/index.js';
|
|
7
|
-
import { toaster } from '../../../client/utils/index.js';
|
|
8
|
-
import { CalendarIcon, CheckIcon, ClockStopWatchIcon, InfoCircleIcon, } from '../../../icons/index.js';
|
|
9
|
-
import { Badge, Button } from '../../../ui/index.js';
|
|
10
|
-
import { getAvailableQuestsQueryKey, getQueryClient } from '../../../utils/index.js';
|
|
11
|
-
import CountdownTimer from '../CountdownTimer.js';
|
|
12
|
-
import { DailyCheckInQuestModal } from './DailyCheckInQuestModal.js';
|
|
13
|
-
export function DailyCheckInQuest({ quest }) {
|
|
14
|
-
const queryClient = getQueryClient();
|
|
15
|
-
const [showRules, setShowRules] = useState(false);
|
|
16
|
-
const [isExpired, setIsExpired] = useState(false);
|
|
17
|
-
const { name, description, status, lastCheckInDate, progressPercentage, checkInStreak, thirdDayBonusAmount, sixthDayBonusAmount, seventhDayBonusAmount, endDateTime, id, } = quest;
|
|
18
|
-
const today = startOfDay(new Date());
|
|
19
|
-
const hasCheckedInToday = lastCheckInDate
|
|
20
|
-
? isEqual(today, startOfDay(new Date(lastCheckInDate)))
|
|
21
|
-
: false;
|
|
22
|
-
const checkedInRewards = {
|
|
23
|
-
3: thirdDayBonusAmount,
|
|
24
|
-
6: sixthDayBonusAmount,
|
|
25
|
-
7: seventhDayBonusAmount,
|
|
26
|
-
};
|
|
27
|
-
const dailyCheckedInData = Array.from({ length: 7 }, (_, i) => {
|
|
28
|
-
const day = i + 1;
|
|
29
|
-
return {
|
|
30
|
-
day,
|
|
31
|
-
reward: checkedInRewards[day] ?? 0,
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
const { mutate } = useCheckInDailyCheckInQuestMutation({
|
|
35
|
-
onSuccess() {
|
|
36
|
-
toaster.success({
|
|
37
|
-
title: 'Check-in successful 🎉',
|
|
38
|
-
description: 'You’ve successfully checked in for today! Keep it up to maintain your streak!',
|
|
39
|
-
});
|
|
40
|
-
queryClient.invalidateQueries({
|
|
41
|
-
queryKey: getAvailableQuestsQueryKey(),
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
onError(e) {
|
|
45
|
-
toaster.error({
|
|
46
|
-
title: 'Check-in successful 🎉',
|
|
47
|
-
description: e.message ?? 'Check-In Failed',
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
const handleCheckIn = async () => mutate(id);
|
|
52
|
-
return (_jsxs(_Fragment, { children: [_jsx(DailyCheckInQuestModal, { modalState: {
|
|
53
|
-
isOpen: showRules,
|
|
54
|
-
setIsOpen: setShowRules,
|
|
55
|
-
} }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary flex h-full w-full flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(CountdownTimer, { endDateTime: endDateTime, renderAction: (timeLeft) => (_jsxs(Badge.Root, { size: "lg", colorScheme: "brand", round: false, children: [_jsx(Badge.Icon, { children: _jsx(ClockStopWatchIcon, {}) }), _jsxs(Badge.Label, { children: [timeLeft.days, "d:", timeLeft.hours, "h:", timeLeft.minutes, "m:", timeLeft.seconds, "s"] })] })), onEnd: () => setIsExpired(true) }), _jsx("div", { role: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => setShowRules((prev) => !prev), children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("p", { className: "text-xl font-semibold", children: name }), _jsx("p", { className: "text-text-secondary-700 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsx("div", { className: "grid grid-cols-7", children: dailyCheckedInData.map((item) => {
|
|
56
|
-
const reward = item.reward ? `+₱${item.reward}` : '-';
|
|
57
|
-
return (_jsx("div", { className: twMerge('flex items-center justify-center', item.day <= (checkInStreak || 0)
|
|
58
|
-
? 'text-brand-400'
|
|
59
|
-
: 'text-text-secondary-700'), children: _jsx("p", { children: reward }) }, item.day));
|
|
60
|
-
}) }), _jsx("div", { className: "bg-bg-primary h-2 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "bg-utility-brand-600 h-full rounded-full transition-all duration-300", style: { width: `${progressPercentage}%` } }) }), _jsx("div", { className: "grid grid-cols-7", children: dailyCheckedInData.map((item) => (_jsx("div", { className: "flex items-center justify-center", children: _jsx(CalendarWithDayNumber, { day: item.day, currentCheckedInDays: checkInStreak || 0 }, item.day) }, item.day))) })] }), _jsx(Button, { onClick: handleCheckIn, className: "disabled:bg-bg-primary disabled:text-text-disabled", disabled: isExpired ||
|
|
61
|
-
status === 'COMPLETED' ||
|
|
62
|
-
status === 'FAILED' ||
|
|
63
|
-
hasCheckedInToday, children: hasCheckedInToday && status === 'IN_PROGRESS' ? (_jsx(CountdownTimer, { endDateTime: startOfDay(addDays(new Date(), 1)).toISOString(), renderAction: (timeLeft) => (_jsxs("div", { className: "flex items-center space-x-0.5", children: [_jsx(CheckIcon, {}), _jsxs("p", { children: [timeLeft.hours, "h:", timeLeft.minutes, "m:", timeLeft.seconds, "s"] })] })), onEnd: () => {
|
|
64
|
-
queryClient.invalidateQueries({
|
|
65
|
-
queryKey: getAvailableQuestsQueryKey(),
|
|
66
|
-
});
|
|
67
|
-
} })) : ('Check-In') })] })] }));
|
|
68
|
-
}
|
|
69
|
-
function CalendarWithDayNumber({ day, currentCheckedInDays, }) {
|
|
70
|
-
return (_jsxs("div", { className: twMerge('group relative h-fit w-fit', day <= currentCheckedInDays
|
|
71
|
-
? 'text-brand-400'
|
|
72
|
-
: 'text-text-secondary-700'), children: [_jsx(CalendarIcon, {}), _jsx("div", { className: "absolute inset-0 mt-1 flex items-center justify-center text-2xs lg:mt-[2px]", children: _jsx("p", { className: "text-center", children: day }) })] }));
|
|
73
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Portal } from '@ark-ui/react';
|
|
4
|
-
import { XIcon } from '../../../icons/index.js';
|
|
5
|
-
import { Button, Dialog } from '../../../ui/index.js';
|
|
6
|
-
export function DailyCheckInQuestModal(props) {
|
|
7
|
-
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: props.modalState.isOpen, onOpenChange: ({ open }) => props.modalState.setIsOpen(open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("p", { className: "text-text-primary-900 text-lg font-semibold", children: "Daily Check-In Rules" }), _jsxs("ul", { className: "text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal", children: [_jsx("li", { children: "Earn rewards just for checking in each day!" }), _jsx("li", { children: "Stay consistent to unlock special rewards on the 3rd, 5th, and 7th day." }), _jsx("li", { children: "Missing a day will reset your streak, starting again from Day 1." }), _jsx("li", { children: "Each check-in unlocks the next one on the following day." }), _jsx("li", { children: "Successfully check in for 7 consecutive days to complete the quest and reset the cycle." })] })] }), _jsx("div", { className: "pb-4 pt-6", children: _jsx(Button, { onClick: () => props.modalState.setIsOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
8
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Image from 'next/image';
|
|
4
|
-
import { useAvailableQuestsQuery } from '../../client/hooks/index.js';
|
|
5
|
-
import { SpinnerIcon } from '../../icons/index.js';
|
|
6
|
-
import closeChest from '../../images/close-chest.png';
|
|
7
|
-
import { DailyCheckInQuest } from './DailyCheckInQuest/DailyCheckInQuest.js';
|
|
8
|
-
import { OnboardingQuest } from './OnboardingQuest/OnboardingQuest.js';
|
|
9
|
-
import { WageringQuest } from './WageringQuest/WageringQuest.js';
|
|
10
|
-
const QUEST_COMPONENT_MAP = {
|
|
11
|
-
DAILY_CHECKIN: DailyCheckInQuest,
|
|
12
|
-
ONBOARDING: OnboardingQuest,
|
|
13
|
-
WAGERING: WageringQuest,
|
|
14
|
-
};
|
|
15
|
-
export function Quests__client(props) {
|
|
16
|
-
const query = useAvailableQuestsQuery();
|
|
17
|
-
if (query.isLoading) {
|
|
18
|
-
return (_jsxs("div", { className: props.className, children: [_jsx("h3", { className: "mb-3 text-lg font-semibold", children: props.heading ?? 'Quests' }), _jsx(SpinnerIcon, { className: "mx-auto size-5 h-[50vh]" })] }));
|
|
19
|
-
}
|
|
20
|
-
if (!query.data?.length) {
|
|
21
|
-
return (_jsxs("div", { className: props.className, children: [_jsx("h3", { className: "mb-3 text-lg font-semibold", children: props.heading ?? 'Quests' }), _jsxs("div", { className: "mt-11 flex flex-col items-center justify-center", children: [_jsx(Image, { src: closeChest, width: 100, height: 100, alt: "No Quests Available", className: "mix-blend-luminosity", quality: 100 }), _jsx("div", { className: "text-text-primary-900 mt-4 text-base font-semibold", children: props.heading ?? 'Quests' }), _jsx("div", { className: "text-text-tertiary-600 mt-1 text-center text-sm", children: "No available quests. Please check back later!" })] })] }));
|
|
22
|
-
}
|
|
23
|
-
return (_jsxs("div", { className: props.className, children: [_jsx("h3", { className: "mb-3 text-lg font-semibold", children: props.heading ?? 'Quests' }), _jsx("div", { className: "grid grid-cols-1 gap-3xl lg:grid-cols-3", children: query.data.map((quest, index) => {
|
|
24
|
-
const QuestComponent = QUEST_COMPONENT_MAP[quest.type];
|
|
25
|
-
return _jsx(QuestComponent, { quest: quest }, index);
|
|
26
|
-
}) })] }));
|
|
27
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { prefetchAvailableQuestsQuery } from '../../server/utils/index.js';
|
|
3
|
-
import { Quests__client } from './Quests.client.js';
|
|
4
|
-
export async function Quests(props) {
|
|
5
|
-
await prefetchAvailableQuestsQuery();
|
|
6
|
-
return _jsx(Quests__client, { ...props });
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { ClockStopWatchIcon, InfoCircleIcon } from '../../../icons/index.js';
|
|
6
|
-
import { Badge } from '../../../ui/index.js';
|
|
7
|
-
import CountdownTimer from '../CountdownTimer.js';
|
|
8
|
-
import { WageringQuestModal } from './WageringQuestModal.js';
|
|
9
|
-
export function WageringQuest({ quest }) {
|
|
10
|
-
const [showRules, setShowRules] = useState(false);
|
|
11
|
-
const [isExpired, setIsExpired] = useState(false);
|
|
12
|
-
const { progressPercentage, turnover, targetTurnover, name, description, endDateTime, bonus, status, } = quest;
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsx(WageringQuestModal, { questName: name, modalState: {
|
|
14
|
-
isOpen: showRules,
|
|
15
|
-
setIsOpen: setShowRules,
|
|
16
|
-
} }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary flex h-full w-full flex-col space-y-6 rounded-2xl border px-4 pb-6 pt-5", children: [_jsxs("div", { className: "flex flex-col space-y-2", children: [_jsxs("div", { className: "flex max-h-7.5 items-start justify-between", children: [_jsx(CountdownTimer, { endDateTime: endDateTime, renderAction: (timeLeft) => (_jsxs(Badge.Root, { size: "lg", colorScheme: "brand", round: false, children: [_jsx(Badge.Icon, { children: _jsx(ClockStopWatchIcon, {}) }), _jsxs(Badge.Label, { children: [timeLeft.days, "d:", timeLeft.hours, "h:", timeLeft.minutes, "m:", timeLeft.seconds, "s"] })] })), onEnd: () => setIsExpired(true) }), _jsx("div", { role: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => setShowRules((prev) => !prev), children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("p", { className: "text-xl font-semibold", children: name }), _jsx("p", { className: "text-text-secondary-700 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: description } })] }), _jsxs("div", { className: "flex w-full flex-col space-y-2", children: [_jsxs("div", { className: "text-text-primary-brand group flex items-center justify-between", children: [_jsxs("p", { children: ["Progress ", parseInt(progressPercentage).toFixed(2), "%"] }), _jsxs("p", { children: [turnover, _jsxs("span", { className: "text-text-quarterary-brand", children: ["/", targetTurnover, " PHP"] })] })] }), _jsx("div", { className: "bg-bg-primary h-2 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "bg-utility-brand-600 h-full rounded-full transition-all duration-300", style: { width: `${progressPercentage}%` } }) })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx("div", { className: "bg-button-secondary-bg border-bg-primary-hover w-full rounded-md border px-3.5 py-2.5 text-center text-white", children: _jsxs("p", { className: twMerge(isExpired || status === 'COMPLETED' || status === 'FAILED'
|
|
17
|
-
? ['opacity-50 grayscale']
|
|
18
|
-
: ''), children: ["Complete to get ", _jsxs("span", { className: "text-brand-400", children: ["\u20B1", bonus] }), ' ', "bonus!"] }) }) })] })] }));
|
|
19
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Portal } from '@ark-ui/react';
|
|
4
|
-
import { XIcon } from '../../../icons/index.js';
|
|
5
|
-
import { Button, Dialog } from '../../../ui/index.js';
|
|
6
|
-
export function WageringQuestModal(props) {
|
|
7
|
-
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: props.modalState.isOpen, onOpenChange: ({ open }) => props.modalState.setIsOpen(open), closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "min-h-auto mx-auto max-w-[343px] rounded-xl px-4 pb-0 pt-5", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "flex flex-col space-y-5", children: [_jsx("p", { className: "text-text-primary-900 text-lg font-semibold", children: props.questName }), _jsxs("ul", { className: "text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal", children: [_jsx("li", { children: "Earn extra rewards just by playing Slots, every bet counts, win or lose!" }), _jsx("li", { children: "Reach the wagering requirement in bets to complete the quest and claim your reward." })] })] }), _jsx("div", { className: "pb-4 pt-6", children: _jsx(Button, { onClick: () => props.modalState.setIsOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Quests';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Quests.js';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { Portal } from '@ark-ui/react';
|
|
4
|
-
import Image, {} from 'next/image';
|
|
5
|
-
import { useRef, useState } from 'react';
|
|
6
|
-
import { useShallow } from 'zustand/shallow';
|
|
7
|
-
import { useGamesQuery, useGlobalStore } from '../../client/hooks/index.js';
|
|
8
|
-
import { SearchLgIcon, XIcon } from '../../icons/index.js';
|
|
9
|
-
import providerHacksaw from '../../images/hacksaw-gaming.png';
|
|
10
|
-
import { Button, Dialog, Field, IconButton, Presence } from '../../ui/index.js';
|
|
11
|
-
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
12
|
-
export function Search(props) {
|
|
13
|
-
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
14
|
-
search: ctx.search,
|
|
15
|
-
})));
|
|
16
|
-
const inputRef = useRef(null);
|
|
17
|
-
const [search, setSearch] = useState('');
|
|
18
|
-
const gamesQuery = useGamesQuery({
|
|
19
|
-
first: 18,
|
|
20
|
-
search,
|
|
21
|
-
}, {
|
|
22
|
-
enabled: search.length >= 3,
|
|
23
|
-
});
|
|
24
|
-
const games = gamesQuery.data?.pages
|
|
25
|
-
.map((page) => page.edges.map((edge) => edge.node))
|
|
26
|
-
.flat() ?? [];
|
|
27
|
-
return (_jsx(Dialog.Root, { open: globalStore.search.open, onOpenChange: (details) => globalStore.search.setOpen(details.open), lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "bg-bg-primary lg:min-h-auto mx-auto min-h-full w-full pt-xl lg:mt-[132px] lg:max-w-[1136px] lg:bg-unset lg:pt-0", children: [_jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "flex items-center justify-between px-4 lg:hidden", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 40, className: "h-8 w-auto" }), _jsx(IconButton, { size: "sm", colorScheme: "gray", onClick: () => api.setOpen(false), children: _jsx(XIcon, { className: "text-text-quinary size-6" }) })] })) }), _jsx("div", { className: "flex justify-end", children: _jsx(Dialog.Context, { children: (api) => (_jsx("button", { type: "button", onClick: () => api.setOpen(false), className: "hidden size-9 items-center justify-center rounded-md bg-white/20 lg:flex", children: _jsx(XIcon, { className: "size-5 text-white" }) })) }) }), _jsx("div", { className: "mt-2xl px-4 lg:mt-xl lg:px-0", children: _jsxs("div", { className: "relative", children: [_jsx(SearchLgIcon, { className: "text-text-quinary pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2" }), _jsx(Field.Input, { ref: inputRef, type: "search", value: search, onChange: (e) => {
|
|
28
|
-
setSearch(e.target.value);
|
|
29
|
-
}, className: "pl-10 pr-16", placeholder: "Search", autoComplete: "off" }), _jsx(Presence, { present: search.length > 0, asChild: true, lazyMount: true, children: _jsx("button", { type: "button", className: "text-text-secondary-700 absolute right-3.5 top-1/2 -translate-y-1/2 font-semibold", onClick: () => {
|
|
30
|
-
setSearch('');
|
|
31
|
-
inputRef.current?.focus();
|
|
32
|
-
}, children: "Clear" }) })] }) }), _jsx("div", { className: "lg:bg-bg-primary lg:border-border-primary mt-2xl p-xl pb-3xl lg:mt-2 lg:rounded-xl lg:border", children: search.length <= 0 ? (_jsx(Alert, { message: "Search for your favorite game or provider." })) : search.length >= 1 && search.length <= 2 ? (_jsx(Alert, { message: "Search requires at least 3 characters." })) : (_jsxs(_Fragment, { children: [games.length <= 0 && _jsx(Alert, { message: "No results found" }), games.length > 0 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "text-lg font-semibold", children: "Providers" }), _jsx("div", { className: "mb-3xl mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: _jsx("div", { className: "bg-gray-800 flex h-14 w-full items-center rounded-md", children: _jsx(Image, { src: providerHacksaw, alt: "", width: 100, height: 50, className: "mx-auto h-auto w-full" }) }) }), _jsx("h2", { className: "text-lg font-semibold", children: "Games" }), _jsx("div", { className: "mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: games.map((game) => (_jsxs(GameLaunchTrigger, { game: game, className: "block w-full shadow-sm", onClick: () => {
|
|
33
|
-
globalStore.search.setOpen(false);
|
|
34
|
-
}, children: [_jsx(Image, { src: game.image, alt: "", width: 200, height: 200, priority: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: "bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold", children: game.name })] }, game.id))) }), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: "mx-auto mt-12 w-fit", onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) })] }) })] }) }));
|
|
35
|
-
}
|
|
36
|
-
function Alert({ message }) {
|
|
37
|
-
return (_jsxs("div", { className: "py-lg", role: "alert", "aria-live": "polite", children: [_jsx("div", { className: "bg-bg-secondary shadow-xs border-border-primary mx-auto flex size-12 items-center justify-center rounded-lg border", children: _jsx(SearchLgIcon, { className: "text-text-secondary-700 size-6" }) }), _jsx("p", { className: "text-text-secondary-700 mt-4 text-center", children: message })] }));
|
|
38
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { ark } from '@ark-ui/react';
|
|
4
|
-
import { useShallow } from 'zustand/shallow';
|
|
5
|
-
import { useGlobalStore } from '../../client/hooks/index.js';
|
|
6
|
-
export function SearchTrigger(props) {
|
|
7
|
-
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
8
|
-
search: ctx.search,
|
|
9
|
-
})));
|
|
10
|
-
return (_jsx(ark.button, { type: "button", "aria-label": "Search", "data-state": globalStore.search.open ? 'open' : 'closed', ...props, onClick: (e) => {
|
|
11
|
-
globalStore.search.setOpen(!globalStore.search.open);
|
|
12
|
-
return props.onClick?.(e);
|
|
13
|
-
} }));
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function MobileNumberSignIn(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useDialogContext } from '@ark-ui/react';
|
|
3
|
-
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
|
-
import { useRef } 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
|
-
import { useSignInContext } from './SignInContext.js';
|
|
13
|
-
export function MobileNumberSignIn() {
|
|
14
|
-
const context = useSignInContext();
|
|
15
|
-
const dialog = useDialogContext();
|
|
16
|
-
const signUpStore = useGlobalStore(useShallow((popups) => popups.signUp));
|
|
17
|
-
const signInMutation = useSignInMutation();
|
|
18
|
-
const sendVerificationCodeMutation = useSendVerificationCodeMutation();
|
|
19
|
-
const localeInfo = useLocaleInfo();
|
|
20
|
-
const mobileNumberParser = useMobileNumberParser();
|
|
21
|
-
const Step1Definition = z.object({
|
|
22
|
-
mobileNumber: z.string().superRefine((v, ctx) => {
|
|
23
|
-
if (!mobileNumberParser.validate(v)) {
|
|
24
|
-
ctx.addIssue({
|
|
25
|
-
code: z.ZodIssueCode.custom,
|
|
26
|
-
message: 'Invalid mobile number',
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}),
|
|
30
|
-
termsAccepted: z.boolean().superRefine((v, ctx) => {
|
|
31
|
-
if (!v) {
|
|
32
|
-
ctx.addIssue({
|
|
33
|
-
code: z.ZodIssueCode.custom,
|
|
34
|
-
message: 'You must accept the terms and conditions',
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}),
|
|
38
|
-
});
|
|
39
|
-
const Step2Definition = z.object({
|
|
40
|
-
verificationCode: z.array(z.string().min(1).max(1).trim()).min(6).max(6),
|
|
41
|
-
});
|
|
42
|
-
const step1Form = useForm({
|
|
43
|
-
resolver: zodResolver(Step1Definition),
|
|
44
|
-
defaultValues: {
|
|
45
|
-
mobileNumber: '',
|
|
46
|
-
termsAccepted: false,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
const step2Form = useForm({
|
|
50
|
-
resolver: zodResolver(Step2Definition),
|
|
51
|
-
defaultValues: {
|
|
52
|
-
verificationCode: Array.from({ length: 6 }).fill(''),
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
const cooldown = useCooldown({
|
|
56
|
-
max: 60,
|
|
57
|
-
duration: 1000 * 60,
|
|
58
|
-
});
|
|
59
|
-
const form2Ref = useRef(null);
|
|
60
|
-
return (_jsxs(_Fragment, { children: [context.step === 1 && (_jsxs(_Fragment, { children: [_jsxs("form", { className: "mt-3xl", onSubmit: step1Form.handleSubmit(async (data) => {
|
|
61
|
-
try {
|
|
62
|
-
await sendVerificationCodeMutation.mutateAsync({
|
|
63
|
-
channel: 'SMS',
|
|
64
|
-
recipient: mobileNumberParser.format(data.mobileNumber),
|
|
65
|
-
strict: true,
|
|
66
|
-
});
|
|
67
|
-
context.setStep(2);
|
|
68
|
-
cooldown.start();
|
|
69
|
-
}
|
|
70
|
-
catch (e) {
|
|
71
|
-
toaster.error({
|
|
72
|
-
description: e instanceof Error
|
|
73
|
-
? e.message
|
|
74
|
-
: 'Failed to send verification code',
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}), children: [_jsxs(Field.Root, { invalid: !!step1Form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx(localeInfo.country.flag, { className: "absolute left-3.5 top-1/2 size-5 shrink-0 -translate-y-1/2" }), _jsx(Field.Input, { className: "pl-11", placeholder: `${localeInfo.mobileNumber.areaCode}${localeInfo.mobileNumber.example}`, ...step1Form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: step1Form.formState.errors.mobileNumber?.message })] }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: step1Form.formState.isSubmitting, children: "Log In" }), _jsx(Controller, { control: step1Form.control, name: "termsAccepted", render: (o) => (_jsxs(Checkbox.Root, { className: "mt-xl", invalid: o.fieldState.invalid, checked: o.field.value, onCheckedChange: (details) => {
|
|
78
|
-
o.field.onChange(details.checked);
|
|
79
|
-
}, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsxs(Checkbox.Label, { children: ["I am at least 21 years of age and I accept the", ' ', _jsx("span", { className: "text-brand-400 whitespace-nowrap underline underline-offset-2", children: "Terms and Conditions." })] }), _jsx(Checkbox.HiddenInput, {})] })) })] }), _jsxs("div", { className: "relative mt-6 text-center", children: [_jsx("hr", { className: "-translte-y-1/2 text-text-tertiary-600/50 absolute top-1/2 w-full" }), _jsx("span", { className: "text-text-tertiary-600 bg-bg-primary-alt relative px-md text-center text-sm font-semibold", children: "Log in directly with" })] }), _jsxs("div", { className: "mt-6", children: [_jsxs(Button, { variant: "outline", colorScheme: "gray", onClick: () => {
|
|
80
|
-
dialog.setOpen(false);
|
|
81
|
-
}, className: "border-border-primary bg-bg-primary text-text-secondary-700", children: [_jsx(GoogleIcon, { className: "size-6" }), "Continue with Google"] }), _jsxs(Button, { variant: "outline", colorScheme: "gray", onClick: () => {
|
|
82
|
-
dialog.setOpen(false);
|
|
83
|
-
}, className: "border-border-primary bg-bg-primary text-text-secondary-700 mt-lg", children: [_jsx(FacebookIcon, { className: "size-6" }), "Continue with Facebook"] })] }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-tertiary-600", children: "Don't have an account?" }), _jsx("button", { type: "submit", className: "text-button-tertiary-fg font-semibold", onClick: () => {
|
|
84
|
-
dialog.setOpen(false);
|
|
85
|
-
signUpStore.setOpen(true);
|
|
86
|
-
}, children: "Sign up" })] })] })), context.step === 2 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "mt-xl text-center text-lg font-semibold", children: "Check your Phone" }), _jsxs("p", { className: "text-text-secondary-700 mt-xs text-center text-sm", children: ["We\u2019ve sent a verification code to your mobile number", ' ', _jsx("span", { className: "font-semibold", children: mobileNumberParser.format(step1Form.getValues('mobileNumber')) }), ' ', "via text"] }), _jsxs("form", { ref: form2Ref, className: "mt-5", onSubmit: step2Form.handleSubmit(async ({ verificationCode }) => {
|
|
87
|
-
const { mobileNumber } = step1Form.getValues();
|
|
88
|
-
try {
|
|
89
|
-
await signInMutation.mutateAsync({
|
|
90
|
-
type: 'MOBILE_NUMBER',
|
|
91
|
-
mobileNumber: mobileNumberParser.format(mobileNumber),
|
|
92
|
-
verificationCode: verificationCode.join(''),
|
|
93
|
-
});
|
|
94
|
-
dialog.setOpen(false);
|
|
95
|
-
step1Form.reset();
|
|
96
|
-
step2Form.reset();
|
|
97
|
-
context.setStep(1);
|
|
98
|
-
}
|
|
99
|
-
catch {
|
|
100
|
-
toaster.error({
|
|
101
|
-
description: 'Invalid Verification Code',
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}), children: [_jsx(Controller, { name: "verificationCode", control: step2Form.control, render: (o) => (_jsxs(PinInput.Root, { placeholder: "0", invalid: o.fieldState.invalid, value: o.field.value, onValueChange: (details) => {
|
|
105
|
-
o.field.onChange(details.value);
|
|
106
|
-
}, otp: true, onValueComplete: () => {
|
|
107
|
-
form2Ref.current?.requestSubmit();
|
|
108
|
-
}, children: [_jsxs(PinInput.Control, { className: "grid-cols-[1fr_1fr_1fr_auto_1fr_1fr_1fr] items-center gap-md", children: [_jsx(PinInput.Input, { index: 0 }), _jsx(PinInput.Input, { index: 1 }), _jsx(PinInput.Input, { index: 2 }), _jsx("span", { className: "text-text-placeholder-subtle text-2xl font-medium", children: "\u2013" }), _jsx(PinInput.Input, { index: 3 }), _jsx(PinInput.Input, { index: 4 }), _jsx(PinInput.Input, { index: 5 })] }), _jsx(PinInput.HiddenInput, {})] })) }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: step2Form.formState.isSubmitting, children: "Verify" }), _jsxs("div", { className: "mt-3 flex w-full items-center justify-center gap-xs text-sm", children: [_jsx("span", { className: "text-text-secondary-700", children: "Didn't recieve the code?" }), _jsx("button", { type: "button", className: "text-button-secondary-fg font-semibold", disabled: cooldown.cooling, onClick: async () => {
|
|
109
|
-
await sendVerificationCodeMutation.mutateAsync({
|
|
110
|
-
channel: 'SMS',
|
|
111
|
-
recipient: mobileNumberParser.format(step1Form.getValues('mobileNumber')),
|
|
112
|
-
});
|
|
113
|
-
cooldown.start();
|
|
114
|
-
}, children: cooldown.cooling
|
|
115
|
-
? `Resend in ${cooldown.countdown}s`
|
|
116
|
-
: 'Resend' })] }), _jsxs("button", { type: "button", className: "text-text-tertiary-600 mx-auto mt-3xl flex w-fit items-center gap-1 text-sm font-semibold", onClick: () => {
|
|
117
|
-
context.setStep(1);
|
|
118
|
-
step2Form.reset();
|
|
119
|
-
cooldown.stop();
|
|
120
|
-
}, children: [_jsx(ArrowLeftIcon, { className: "size-5" }), "Back"] })] })] }))] }));
|
|
121
|
-
}
|