@opexa/portal-components 0.0.107 → 0.0.109
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/useAuthenticateMutation.js +2 -1
- package/dist/client/hooks/useCheckInDailyCheckInQuestMutation.d.ts +1 -1
- package/dist/client/hooks/useCheckInDailyCheckInQuestMutation.js +20 -2
- package/dist/client/hooks/useClaimCashbackBonusMutation.js +2 -1
- package/dist/client/hooks/useClaimSpotBonusMutation.js +2 -1
- package/dist/client/hooks/useCompleteOnboardingMutation.d.ts +3 -0
- package/dist/client/hooks/useCompleteOnboardingMutation.js +25 -0
- package/dist/client/hooks/useCreateGCashDepositMutation.js +20 -1
- package/dist/client/hooks/useCreateGCashWithdrawalMutation.js +1 -1
- package/dist/client/hooks/useCreateGameSessionMutation.js +1 -1
- package/dist/client/hooks/useCreateInstapayWithdrawalMutation.js +1 -1
- package/dist/client/hooks/useCreateMayaAppDepositMutation.js +20 -1
- package/dist/client/hooks/useCreateMayaAppWithdrawalMutation.js +1 -1
- package/dist/client/hooks/useCreateMayaDepositMutation.js +20 -1
- package/dist/client/hooks/useCreateMayaWithdrawalMutation.js +1 -1
- package/dist/client/hooks/useCreateMemberVerificationMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateMemberVerificationMutation.js +45 -0
- package/dist/client/hooks/useCreateOnlineBankDepositMutation.js +20 -1
- package/dist/client/hooks/useCreateQRPHDepositMutation.js +20 -1
- package/dist/client/hooks/useEndGameSessionMutation.js +1 -1
- package/dist/client/hooks/useFileQuery.d.ts +2 -0
- package/dist/client/hooks/useFileQuery.js +30 -0
- package/dist/client/hooks/useMarkGameAsFavoriteMutation.js +24 -5
- package/dist/client/hooks/useMarkMessageAsReadMutation.js +16 -7
- package/dist/client/hooks/useOnboardingStatusQuery.d.ts +2 -0
- package/dist/client/hooks/useOnboardingStatusQuery.js +28 -0
- package/dist/client/hooks/useRecommendedGamesQuery.d.ts +2 -0
- package/dist/client/hooks/useRecommendedGamesQuery.js +27 -0
- package/dist/client/hooks/useRemainingTime.d.ts +12 -1
- package/dist/client/hooks/useRemainingTime.js +37 -6
- package/dist/client/hooks/useSendVerificationCodeMutation.js +1 -1
- package/dist/client/hooks/useSignInMutation.js +2 -1
- package/dist/client/hooks/useSignOutMutation.js +2 -1
- package/dist/client/hooks/useSignUpMutation.js +1 -1
- package/dist/client/hooks/useSiteQuery.d.ts +2 -0
- package/dist/client/hooks/useSiteQuery.js +16 -0
- package/dist/client/hooks/useSkipOnboardingMutation.d.ts +2 -0
- package/dist/client/hooks/useSkipOnboardingMutation.js +25 -0
- package/dist/client/hooks/useUnmarkGameAsFavoriteMutation.js +5 -5
- package/dist/client/hooks/useUpdateAccountMutation.js +2 -1
- package/dist/client/hooks/useUpdateMemberVerificationMutation.d.ts +6 -0
- package/dist/client/hooks/useUpdateMemberVerificationMutation.js +38 -0
- package/dist/client/hooks/useUploadImageFileMutation.d.ts +4 -0
- package/dist/client/hooks/useUploadImageFileMutation.js +24 -0
- package/dist/client/utils/createContext.js +1 -1
- package/dist/client/utils/createRecipeContext.js +1 -1
- package/dist/components/BetRecords/BetRecords.client.js +1 -1
- package/dist/components/Bonus/Bonus.client.js +1 -1
- package/dist/components/Bonuses/Bonuses.client.js +1 -1
- package/dist/components/Cashback/Cashback.client.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/Disclaimer/DisclaimerV1.js +1 -1
- package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
- package/dist/components/Games/Game.js +1 -1
- package/dist/components/Games/GamesCarousel.client.js +1 -1
- package/dist/components/Games/GamesList.client.js +1 -1
- package/dist/components/GamesSearch/GamesSearch.js +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/KYC/BasicInformation.js +85 -4
- package/dist/components/KYC/CaptureIdDocument.d.ts +1 -0
- package/dist/components/KYC/CaptureIdDocument.js +11 -0
- package/dist/components/KYC/CaptureSelfie.d.ts +1 -0
- package/dist/components/KYC/CaptureSelfie.js +11 -0
- package/dist/components/KYC/IdentityVerification.js +20 -4
- package/dist/components/KYC/Indicator.js +1 -1
- package/dist/components/KYC/KYC.lazy.js +7 -1
- package/dist/components/KYC/PersonalInformation.js +92 -5
- package/dist/components/KYC/useKYC.d.ts +15 -0
- package/dist/components/KYC/useKYC.js +18 -1
- package/dist/components/Messages/Messages.lazy.js +1 -1
- package/dist/components/News/News.d.ts +10 -0
- package/dist/components/News/News.js +10 -0
- package/dist/components/News/index.d.ts +1 -0
- package/dist/components/News/index.js +1 -0
- package/dist/components/NewsFeed/NewsFeed.d.ts +18 -0
- package/dist/components/NewsFeed/NewsFeed.js +11 -0
- package/dist/components/NewsFeed/index.d.ts +1 -0
- package/dist/components/NewsFeed/index.js +1 -0
- package/dist/components/Promo/Promo.client.js +1 -1
- package/dist/components/Promos/PromosCarousel.js +1 -1
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +1 -4
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +28 -25
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestRules.d.ts +6 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestRules.js +15 -0
- package/dist/components/Quests/DailyCheckInQuest.d.ts +1 -0
- package/dist/components/Quests/DailyCheckInQuest.js +96 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +1 -4
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +27 -3
- package/dist/components/Quests/OnboardingQuest/OnboardingQuestRules.d.ts +6 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuestRules.js +15 -0
- package/dist/components/Quests/OnboardingQuest.d.ts +1 -0
- package/dist/components/Quests/OnboardingQuest.js +47 -0
- package/dist/components/Quests/Quests.client.d.ts +2 -0
- package/dist/components/Quests/Quests.client.js +25 -10
- package/dist/components/Quests/QuestsContext.d.ts +2 -0
- package/dist/components/Quests/QuestsContext.js +2 -0
- package/dist/components/Quests/RemainingTime.d.ts +1 -0
- package/dist/components/Quests/RemainingTime.js +19 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +1 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.js +12 -9
- package/dist/components/Quests/WageringQuest/WageringQuestRules.d.ts +7 -0
- package/dist/components/Quests/WageringQuest/WageringQuestRules.js +17 -0
- package/dist/components/Quests/WageringQuest.d.ts +1 -0
- package/dist/components/Quests/WageringQuest.js +36 -0
- package/dist/components/Search/Search.lazy.js +1 -1
- package/dist/components/SignIn/MobileNumberSignIn.js +7 -4
- package/dist/components/SignIn/NameAndPasswordSignIn.js +10 -5
- package/dist/components/SignUp/SignUpForm.js +13 -7
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
- package/dist/constants/{endpoints.js → Endpoint.js} +1 -1
- package/dist/constants/index.d.ts +7 -7
- package/dist/constants/index.js +7 -7
- package/dist/server/utils/prefetchAccountQuery.js +5 -2
- package/dist/server/utils/prefetchAvailablePromosQuery.js +5 -2
- package/dist/server/utils/prefetchAvailableQuestsCountQuery.js +5 -2
- package/dist/server/utils/prefetchAvailableQuestsQuery.js +5 -2
- package/dist/server/utils/prefetchBetRecordsQuery.js +5 -2
- package/dist/server/utils/prefetchBonusQuery.js +5 -2
- package/dist/server/utils/prefetchBonusesCountQuery.js +5 -2
- package/dist/server/utils/prefetchBonusesQuery.js +5 -2
- package/dist/server/utils/prefetchCashbackBonusQuery.js +5 -2
- package/dist/server/utils/prefetchCashbackBonusesCountQuery.js +5 -2
- package/dist/server/utils/prefetchCashbackBonusesQuery.js +5 -2
- package/dist/server/utils/prefetchCashbackQuery.js +5 -2
- package/dist/server/utils/prefetchCashbacksQuery.js +5 -2
- package/dist/server/utils/prefetchDepositQuery.js +5 -2
- package/dist/server/utils/prefetchDepositRecordsQuery.js +5 -2
- package/dist/server/utils/prefetchDepositsCountQuery.js +5 -2
- package/dist/server/utils/prefetchFavoriteGamesQuery.js +5 -2
- package/dist/server/utils/prefetchFileQuery.d.ts +1 -0
- package/dist/server/utils/prefetchFileQuery.js +23 -0
- package/dist/server/utils/prefetchGamesQuery.js +5 -2
- package/dist/server/utils/prefetchInstapayBankListQuery.js +5 -2
- package/dist/server/utils/prefetchIsMayaSessionValidQuery.js +5 -2
- package/dist/server/utils/prefetchJackpotsCountQuery.js +5 -2
- package/dist/server/utils/prefetchJackpotsQuery.js +5 -2
- package/dist/server/utils/prefetchMemberVerificationQuery.js +5 -2
- package/dist/server/utils/prefetchOnboardingStatusQuery.d.ts +1 -0
- package/dist/server/utils/prefetchOnboardingStatusQuery.js +24 -0
- package/dist/server/utils/prefetchPaymentSettingsQuery.js +5 -2
- package/dist/server/utils/prefetchPlatformQuery.js +5 -2
- package/dist/server/utils/prefetchProfileCompletionQuery.js +5 -2
- package/dist/server/utils/prefetchPromoQuery.js +5 -2
- package/dist/server/utils/prefetchPromosQuery.js +5 -2
- package/dist/server/utils/prefetchRecommendedGamesQuery.d.ts +1 -0
- package/dist/server/utils/prefetchRecommendedGamesQuery.js +23 -0
- package/dist/server/utils/prefetchSessionQuery.js +6 -3
- package/dist/server/utils/prefetchSiteQuery.d.ts +1 -0
- package/dist/server/utils/prefetchSiteQuery.js +17 -0
- package/dist/server/utils/prefetchTopWinsQuery.js +5 -2
- package/dist/server/utils/prefetchTournamentsCountQuery.js +5 -2
- package/dist/server/utils/prefetchTournamentsQuery.js +5 -2
- package/dist/server/utils/prefetchTransactionRecordsQuery.js +5 -2
- package/dist/server/utils/prefetchUnreadMessagesCountQuery.js +5 -2
- package/dist/server/utils/prefetchWalletQuery.js +5 -2
- package/dist/server/utils/prefetchWithdrawalRecordsQuery.js +5 -2
- package/dist/services/account.d.ts +1 -0
- package/dist/services/account.js +11 -1
- package/dist/services/queries.d.ts +2 -1
- package/dist/services/queries.js +2369 -2351
- package/dist/styles/theme.css +699 -698
- package/dist/types/index.d.ts +7 -0
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/checkbox.recipe.js +2 -2
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/Dialog/dialog.recipe.js +1 -1
- package/dist/ui/Menu/Menu.d.ts +144 -144
- package/dist/ui/Menu/menu.recipe.d.ts +8 -8
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/utils/callIfFn.d.ts +8 -0
- package/dist/utils/callIfFn.js +8 -0
- package/dist/utils/createPoll.d.ts +1 -0
- package/dist/utils/createPoll.js +1 -0
- package/dist/utils/createSplitProps.d.ts +9 -0
- package/dist/utils/createSplitProps.js +9 -0
- package/dist/utils/log.d.ts +3 -0
- package/dist/utils/log.js +18 -0
- package/dist/utils/mutationKeys.d.ts +29 -0
- package/dist/utils/mutationKeys.js +104 -0
- package/dist/utils/queryKeys.d.ts +5 -24
- package/dist/utils/queryKeys.js +80 -97
- package/package.json +162 -162
- package/dist/client/hooks/index.d.ts +0 -65
- package/dist/client/hooks/index.js +0 -65
- package/dist/client/services/index.d.ts +0 -4
- package/dist/client/services/index.js +0 -4
- package/dist/client/utils/index.d.ts +0 -3
- package/dist/client/utils/index.js +0 -3
- 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/Games/GameContext.d.ts +0 -2
- package/dist/components/Games/GameContext.js +0 -2
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
- package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -66
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -17
- package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -18
- package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -109
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css +0 -184
- package/dist/components/JackpotCounter/index.d.ts +0 -1
- package/dist/components/JackpotCounter/index.js +0 -1
- package/dist/components/Jackpots/JackpotDesktop.d.ts +0 -1
- package/dist/components/Jackpots/JackpotDesktop.js +0 -45
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
- package/dist/components/Jackpots/JackpotGameProviders.js +0 -41
- 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/JackpotMobile.d.ts +0 -1
- package/dist/components/Jackpots/JackpotMobile.js +0 -46
- package/dist/components/Jackpots/JackpotRules.d.ts +0 -5
- package/dist/components/Jackpots/JackpotRules.js +0 -11
- package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
- package/dist/components/Jackpots/Jackpots.client.js +0 -29
- package/dist/components/Jackpots/JackpotsContext.d.ts +0 -4
- package/dist/components/Jackpots/JackpotsContext.js +0 -3
- package/dist/components/Jackpots/useJackpotData.d.ts +0 -14
- package/dist/components/Jackpots/useJackpotData.js +0 -93
- 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 -8
- package/dist/components/KYC/Step1.d.ts +0 -1
- package/dist/components/KYC/Step1.js +0 -13
- package/dist/components/KYC/Step2.d.ts +0 -1
- package/dist/components/KYC/Step2.js +0 -13
- package/dist/components/KYC/Step3.d.ts +0 -1
- package/dist/components/KYC/Step3.js +0 -13
- package/dist/components/KYC/Step4.d.ts +0 -1
- package/dist/components/KYC/Step4.js +0 -7
- package/dist/components/Messages/MessageItem.d.ts +0 -4
- package/dist/components/Messages/MessageItem.js +0 -34
- package/dist/components/PortalProvider/WebVitals.d.ts +0 -1
- package/dist/components/PortalProvider/WebVitals.js +0 -8
- package/dist/components/Promo/PromoContent.d.ts +0 -2
- package/dist/components/Promo/PromoContent.js +0 -9
- package/dist/components/Promos/PromoCarousel.d.ts +0 -2
- package/dist/components/Promos/PromoCarousel.js +0 -41
- package/dist/components/Promos/PromoGrid.d.ts +0 -2
- package/dist/components/Promos/PromoGrid.js +0 -12
- package/dist/components/Promos/PromoItem.d.ts +0 -7
- package/dist/components/Promos/PromoItem.js +0 -10
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
- 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/TournamentDesktop.d.ts +0 -1
- package/dist/components/Tournaments/TournamentDesktop.js +0 -57
- 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/TournamentMobile.d.ts +0 -1
- package/dist/components/Tournaments/TournamentMobile.js +0 -55
- package/dist/components/Tournaments/TournamentRules.d.ts +0 -5
- package/dist/components/Tournaments/TournamentRules.js +0 -11
- package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
- package/dist/components/Tournaments/Tournaments.client.js +0 -20
- package/dist/components/Tournaments/TournamentsContext.d.ts +0 -4
- package/dist/components/Tournaments/TournamentsContext.js +0 -3
- package/dist/components/Tournaments/useTournamentData.d.ts +0 -10
- package/dist/components/Tournaments/useTournamentData.js +0 -72
- package/dist/components/Tournaments/useTournamentItemData.d.ts +0 -16
- package/dist/components/Tournaments/useTournamentItemData.js +0 -64
- package/dist/components/index.d.ts +0 -33
- package/dist/components/index.js +0 -33
- package/dist/icons/index.d.ts +0 -65
- package/dist/icons/index.js +0 -65
- package/dist/images/hacksaw-gaming.png +0 -0
- package/dist/server/services/index.d.ts +0 -4
- package/dist/server/services/index.js +0 -4
- package/dist/server/utils/index.d.ts +0 -29
- package/dist/server/utils/index.js +0 -29
- package/dist/ui/Presence.d.ts +0 -2
- package/dist/ui/Presence.js +0 -7
- package/dist/ui/Prose.d.ts +0 -2
- package/dist/ui/Prose.js +0 -5
- package/dist/ui/index.d.ts +0 -26
- package/dist/ui/index.js +0 -26
- package/dist/utils/index.d.ts +0 -17
- package/dist/utils/index.js +0 -17
- package/dist/utils/isMobile.d.ts +0 -5
- package/dist/utils/isMobile.js +0 -9
- /package/dist/components/{Empty.d.ts → shared/Empty.d.ts} +0 -0
- /package/dist/components/{Empty.js → shared/Empty.js} +0 -0
- /package/dist/components/{InfiniteScroll.d.ts → shared/InfiniteScroll.d.ts} +0 -0
- /package/dist/components/{InfiniteScroll.js → shared/InfiniteScroll.js} +0 -0
- /package/dist/constants/{endpoints.d.ts → Endpoint.d.ts} +0 -0
- /package/dist/constants/{envVars.d.ts → EnvVar.d.ts} +0 -0
- /package/dist/constants/{envVars.js → EnvVar.js} +0 -0
- /package/dist/constants/{gameProviders.d.ts → GameProvider.d.ts} +0 -0
- /package/dist/constants/{gameProviders.js → GameProvider.js} +0 -0
- /package/dist/constants/{gameTypes.d.ts → GameType.d.ts} +0 -0
- /package/dist/constants/{gameTypes.js → GameType.js} +0 -0
- /package/dist/constants/{headerKeys.d.ts → HeaderKey.d.ts} +0 -0
- /package/dist/constants/{headerKeys.js → HeaderKey.js} +0 -0
- /package/dist/constants/{secretQuestions.d.ts → SecretQuestion.d.ts} +0 -0
- /package/dist/constants/{secretQuestions.js → SecretQuestion.js} +0 -0
- /package/dist/constants/{storageKeys.d.ts → StorageKey.d.ts} +0 -0
- /package/dist/constants/{storageKeys.js → StorageKey.js} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { noop } from 'lodash-es';
|
|
3
|
+
import { useShallow } from 'zustand/shallow';
|
|
4
|
+
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
5
|
+
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
6
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
7
|
+
import { useRemainingTime } from '../../client/hooks/useRemainingTime.js';
|
|
8
|
+
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
9
|
+
import { CoinsHandIcon } from '../../icons/CoinsHandIcon.js';
|
|
10
|
+
import { FileCheck02Icon } from '../../icons/FileCheck02Icon.js';
|
|
11
|
+
import { InfoCircleIcon } from '../../icons/InfoCircleIcon.js';
|
|
12
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
13
|
+
import { Button } from '../../ui/Button/index.js';
|
|
14
|
+
import { Checkbox } from '../../ui/Checkbox/index.js';
|
|
15
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
16
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
17
|
+
import { useQuestContext } from './QuestsContext.js';
|
|
18
|
+
import { RemainingTime } from './RemainingTime.js';
|
|
19
|
+
export function OnboardingQuest() {
|
|
20
|
+
const quest = useQuestContext();
|
|
21
|
+
const disclosure = useDisclosure();
|
|
22
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
23
|
+
kyc: ctx.kyc,
|
|
24
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
25
|
+
})));
|
|
26
|
+
const remainingTime = useRemainingTime(quest.endDateTime);
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_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(RemainingTime, {}), _jsx("button", { type: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", children: _jsx(InfoCircleIcon, { className: "text-text-disabled size-5" }) })] }), _jsx("h2", { className: "text-xl font-semibold", children: quest.name }), _jsx("p", { className: "text-text-secondary-700 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: quest.description } })] }), _jsxs("div", { className: "w-full grow space-y-2", children: [_jsxs(Checkbox.Root, { checked: quest.accountVerificationCompleted, onCheckedChange: noop, children: [_jsx(Checkbox.Control, { className: "bg-transparent", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: "text-sm font-medium leading-tight", children: "Complete personal verification" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Checkbox.Root, { checked: quest.firstDepositCompleted, onCheckedChange: noop, children: [_jsx(Checkbox.Control, { className: "bg-transparent", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { className: "text-sm font-medium leading-tight", children: "Make your first deposit" }), _jsx(Checkbox.HiddenInput, {})] })] }), _jsxs("div", { className: "flex gap-lg", children: [_jsxs(Button, { size: "sm", onClick: () => {
|
|
28
|
+
globalStore.kyc.setOpen(true);
|
|
29
|
+
}, disabled: quest.accountVerificationCompleted ||
|
|
30
|
+
quest.status === 'COMPLETED' ||
|
|
31
|
+
quest.status === 'FAILED' ||
|
|
32
|
+
remainingTime.expired, className: "disabled:bg-bg-primary disabled:text-text-disabled", children: [quest.accountVerificationCompleted ? (_jsx(CheckIcon, { className: "size-5" })) : (_jsx(FileCheck02Icon, { className: "size-5" })), "Verify"] }), _jsxs(Button, { size: "sm", onClick: () => {
|
|
33
|
+
globalStore.depositWithdrawal.setTab('DEPOSIT');
|
|
34
|
+
globalStore.depositWithdrawal.setOpen(true);
|
|
35
|
+
}, disabled: quest.firstDepositCompleted ||
|
|
36
|
+
quest.status === 'COMPLETED' ||
|
|
37
|
+
quest.status === 'FAILED' ||
|
|
38
|
+
remainingTime.expired, className: "disabled:bg-bg-primary disabled:text-text-disabled", children: [_jsx(CoinsHandIcon, { className: "size-5" }), "Deposit"] })] })] }), _jsx(Rules, { open: disclosure.open, onOpenChange: disclosure.setOpen })] }));
|
|
39
|
+
}
|
|
40
|
+
function Rules(props) {
|
|
41
|
+
const [open, setOpen] = useControllableState({
|
|
42
|
+
value: props.open,
|
|
43
|
+
defaultValue: props.defaultOpen ?? false,
|
|
44
|
+
onChange: props.onOpenChange,
|
|
45
|
+
});
|
|
46
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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("h2", { className: "text-text-primary-900 text-lg font-semibold", children: "Welcome Quest Rules" }), _jsxs("ol", { className: "text-text-tertiary-600 group list-disc text-wrap pl-4 text-sm font-normal", children: [_jsx("li", { children: "Begin your quest whenever you're ready" }), _jsx("li", { children: "Tackle the tasks in any order you like" }), _jsx("li", { children: "Finish all tasks and we'll credit your reward automatically!" })] })] }), _jsx("div", { className: "pb-4 pt-6", children: _jsx(Button, { onClick: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
47
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
1
2
|
export interface QuestsProps {
|
|
2
3
|
/** @default "Quests" */
|
|
3
4
|
heading?: string;
|
|
4
5
|
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
5
7
|
}
|
|
6
8
|
export declare function Quests__client(props: QuestsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +1,42 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Image from 'next/image';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { z } from 'zod';
|
|
4
6
|
import { useAvailableQuestsQuery } from '../../client/hooks/useAvailableQuestsQuery.js';
|
|
5
7
|
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
6
8
|
import closeChest from '../../images/close-chest.png';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
9
|
+
import { SegmentGroup } from '../../ui/SegmentGroup/index.js';
|
|
10
|
+
import { DailyCheckInQuest } from './DailyCheckInQuest.js';
|
|
11
|
+
import { OnboardingQuest } from './OnboardingQuest.js';
|
|
12
|
+
import { QuestContext } from './QuestsContext.js';
|
|
13
|
+
import { WageringQuest } from './WageringQuest.js';
|
|
10
14
|
const QUEST_COMPONENT_MAP = {
|
|
11
15
|
DAILY_CHECKIN: DailyCheckInQuest,
|
|
12
16
|
ONBOARDING: OnboardingQuest,
|
|
13
17
|
WAGERING: WageringQuest,
|
|
14
18
|
};
|
|
19
|
+
const TabDefinition = z.enum(['AVAILABLE', 'COMPLETED']);
|
|
15
20
|
export function Quests__client(props) {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
const [tab, setTab] = useState('AVAILABLE');
|
|
22
|
+
const questsQuery = useAvailableQuestsQuery();
|
|
23
|
+
const quests = !questsQuery.data?.length
|
|
24
|
+
? []
|
|
25
|
+
: questsQuery.data.filter((quest) => {
|
|
26
|
+
return tab === 'COMPLETED'
|
|
27
|
+
? quest.status !== 'IN_PROGRESS'
|
|
28
|
+
: quest.status === 'IN_PROGRESS';
|
|
29
|
+
});
|
|
30
|
+
if (questsQuery.isLoading) {
|
|
31
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "mb-3 text-lg font-semibold", children: props.heading ?? 'Quests' }), _jsx(SpinnerIcon, { className: "mx-auto size-5 h-[50vh]" })] }));
|
|
19
32
|
}
|
|
20
|
-
if (!
|
|
21
|
-
return (_jsxs("div", { className: props.className, children: [_jsx("
|
|
33
|
+
if (!questsQuery.data?.length) {
|
|
34
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { 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
35
|
}
|
|
23
|
-
return (_jsxs("div", { className: props.className, children: [_jsx("
|
|
36
|
+
return (_jsxs("div", { style: props.style, className: props.className, children: [_jsx("h2", { className: "text-lg font-semibold", children: props.heading ?? 'Quests' }), _jsxs(SegmentGroup.Root, { value: tab, onValueChange: (details) => {
|
|
37
|
+
setTab(TabDefinition.catch('AVAILABLE').parse(details.value));
|
|
38
|
+
}, className: "mt-3 w-full overflow-x-auto lg:mt-4.5 lg:w-fit", children: [_jsxs(SegmentGroup.Item, { value: "AVAILABLE", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Available" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsxs(SegmentGroup.Item, { value: "COMPLETED", className: "w-full lg:w-fit", children: [_jsx(SegmentGroup.ItemText, { children: "Completed" }), _jsx(SegmentGroup.ItemControl, {}), _jsx(SegmentGroup.ItemHiddenInput, {})] }), _jsx(SegmentGroup.Indicator, {})] }), _jsx("div", { className: "mt-3xl grid gap-3xl lg:mt-lg lg:grid-cols-3", children: quests.map((quest) => {
|
|
24
39
|
const QuestComponent = QUEST_COMPONENT_MAP[quest.type];
|
|
25
|
-
return _jsx(
|
|
40
|
+
return (_jsx(QuestContext, { value: quest, children: _jsx(QuestComponent, {}) }, quest.id));
|
|
26
41
|
}) })] }));
|
|
27
42
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RemainingTime(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRemainingTime } from '../../client/hooks/useRemainingTime.js';
|
|
3
|
+
import { ClockStopWatchIcon } from '../../icons/ClockStopWatchIcon.js';
|
|
4
|
+
import { Badge } from '../../ui/Badge/index.js';
|
|
5
|
+
import { useQuestContext } from './QuestsContext.js';
|
|
6
|
+
export function RemainingTime() {
|
|
7
|
+
const quest = useQuestContext();
|
|
8
|
+
const remainingTime = useRemainingTime(quest.endDateTime);
|
|
9
|
+
if (quest.status === 'COMPLETED') {
|
|
10
|
+
return (_jsx(Badge.Root, { size: "lg", colorScheme: "success", round: false, children: _jsx(Badge.Label, { children: "Completed" }) }));
|
|
11
|
+
}
|
|
12
|
+
if (quest.status === 'FAILED') {
|
|
13
|
+
return (_jsx(Badge.Root, { size: "lg", colorScheme: "danger", round: false, children: _jsx(Badge.Label, { children: "Failed" }) }));
|
|
14
|
+
}
|
|
15
|
+
if (remainingTime.expired) {
|
|
16
|
+
return (_jsx(Badge.Root, { size: "lg", colorScheme: "danger", round: false, children: _jsx(Badge.Label, { children: "Expired" }) }));
|
|
17
|
+
}
|
|
18
|
+
return (_jsxs(Badge.Root, { size: "lg", colorScheme: "brand", round: false, children: [_jsx(Badge.Icon, { children: _jsx(ClockStopWatchIcon, {}) }), _jsx(Badge.Label, { children: remainingTime.toString() })] }));
|
|
19
|
+
}
|
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { useDisclosure } from '../../../client/hooks/useDisclosure.js';
|
|
6
|
+
import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
|
|
5
7
|
import { ClockStopWatchIcon } from '../../../icons/ClockStopWatchIcon.js';
|
|
6
8
|
import { InfoCircleIcon } from '../../../icons/InfoCircleIcon.js';
|
|
7
9
|
import { Badge } from '../../../ui/Badge/index.js';
|
|
10
|
+
import { parseDecimal } from '../../../utils/parseDecimal.js';
|
|
8
11
|
import CountdownTimer from '../CountdownTimer.js';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
import { useQuestContext } from '../QuestsContext.js';
|
|
13
|
+
import { WageringQuestModal } from './WageringQuestRules.js';
|
|
14
|
+
export function WageringQuest() {
|
|
15
|
+
const quest = useQuestContext();
|
|
16
|
+
const disclosure = useDisclosure();
|
|
17
|
+
const localeInfo = useLocaleInfo();
|
|
12
18
|
const [isExpired, setIsExpired] = useState(false);
|
|
13
19
|
const { progressPercentage, turnover, targetTurnover, name, description, endDateTime, bonus, status, } = quest;
|
|
14
|
-
return (_jsxs(_Fragment, { children: [_jsx(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} }), _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'
|
|
18
|
-
? ['opacity-50 grayscale']
|
|
19
|
-
: ''), children: ["Complete to get ", _jsxs("span", { className: "text-brand-400", children: ["\u20B1", bonus] }), ' ', "bonus!"] }) }) })] })] }));
|
|
20
|
+
return (_jsxs(_Fragment, { children: [_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: () => disclosure.setOpen(true), 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 ", parseDecimal(progressPercentage, 0).toFixed(2), "%"] }), _jsxs("p", { children: [turnover, _jsxs("span", { className: "text-text-quarterary-brand", children: ["/", targetTurnover, " ", localeInfo.currency.code] })] })] }), _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'
|
|
21
|
+
? 'opacity-50 grayscale'
|
|
22
|
+
: ''), children: ["Complete to get ", _jsxs("span", { className: "text-brand-400", children: ["\u20B1", bonus] }), ' ', "bonus!"] }) }) })] }), _jsx(WageringQuestModal, { open: disclosure.open, onOpenChange: disclosure.setOpen })] }));
|
|
20
23
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useControllableState } from '../../../client/hooks/useControllableState.js';
|
|
4
|
+
import { XIcon } from '../../../icons/XIcon.js';
|
|
5
|
+
import { Button } from '../../../ui/Button/index.js';
|
|
6
|
+
import { Dialog } from '../../../ui/Dialog/index.js';
|
|
7
|
+
import { Portal } from '../../../ui/Portal/index.js';
|
|
8
|
+
import { useQuestContext } from '../QuestsContext.js';
|
|
9
|
+
export function WageringQuestModal(props) {
|
|
10
|
+
const quest = useQuestContext();
|
|
11
|
+
const [open, setOpen] = useControllableState({
|
|
12
|
+
value: props.open,
|
|
13
|
+
defaultValue: props.defaultOpen ?? false,
|
|
14
|
+
onChange: props.onOpenChange,
|
|
15
|
+
});
|
|
16
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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("h2", { className: "text-text-primary-900 text-lg font-semibold", children: quest.name }), _jsxs("ol", { 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: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function WageringQuest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { useControllableState } from '../../client/hooks/useControllableState.js';
|
|
5
|
+
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
6
|
+
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
7
|
+
import { useRemainingTime } from '../../client/hooks/useRemainingTime.js';
|
|
8
|
+
import { InfoCircleIcon } from '../../icons/InfoCircleIcon.js';
|
|
9
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
10
|
+
import { Button } from '../../ui/Button/index.js';
|
|
11
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
12
|
+
import { Portal } from '../../ui/Portal/index.js';
|
|
13
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
14
|
+
import { useQuestContext } from './QuestsContext.js';
|
|
15
|
+
import { RemainingTime } from './RemainingTime.js';
|
|
16
|
+
export function WageringQuest() {
|
|
17
|
+
const quest = useQuestContext();
|
|
18
|
+
const disclosure = useDisclosure();
|
|
19
|
+
const localeInfo = useLocaleInfo();
|
|
20
|
+
const { progressPercentage, turnover, targetTurnover, name, description, endDateTime, bonus, status, } = quest;
|
|
21
|
+
const remainingTime = useRemainingTime(endDateTime);
|
|
22
|
+
return (_jsxs(_Fragment, { children: [_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(RemainingTime, {}), _jsx("button", { type: "button", className: "bg-bg-primary border-border-secondary flex size-9 cursor-pointer items-center justify-center rounded-md border", onClick: () => disclosure.setOpen(true), "aria-label": "View Rules", 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 ", parseDecimal(progressPercentage, 0).toFixed(2), "%"] }), _jsxs("p", { children: [turnover, _jsxs("span", { className: "text-text-quarterary-brand", children: ["/", targetTurnover, " ", localeInfo.currency.code] })] })] }), _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(remainingTime.expired ||
|
|
23
|
+
status === 'COMPLETED' ||
|
|
24
|
+
status === 'FAILED'
|
|
25
|
+
? 'opacity-50 grayscale'
|
|
26
|
+
: ''), children: ["Complete to get ", _jsxs("span", { className: "text-brand-400", children: ["\u20B1", bonus] }), ' ', "bonus!"] }) }) })] }), _jsx(Rules, { open: disclosure.open, onOpenChange: disclosure.setOpen })] }));
|
|
27
|
+
}
|
|
28
|
+
function Rules(props) {
|
|
29
|
+
const quest = useQuestContext();
|
|
30
|
+
const [open, setOpen] = useControllableState({
|
|
31
|
+
value: props.open,
|
|
32
|
+
defaultValue: props.defaultOpen ?? false,
|
|
33
|
+
onChange: props.onOpenChange,
|
|
34
|
+
});
|
|
35
|
+
return (_jsx(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: open, onOpenChange: (details) => setOpen(details.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("h2", { className: "text-text-primary-900 text-lg font-semibold", children: quest.name }), _jsxs("ol", { 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: () => setOpen(false), children: "Ok" }) })] }) })] }) }));
|
|
36
|
+
}
|
|
@@ -16,7 +16,7 @@ import { Dialog } from '../../ui/Dialog/index.js';
|
|
|
16
16
|
import { Field } from '../../ui/Field/index.js';
|
|
17
17
|
import { IconButton } from '../../ui/IconButton/index.js';
|
|
18
18
|
import { Portal } from '../../ui/Portal/index.js';
|
|
19
|
-
import { Presence } from '../../ui/Presence.js';
|
|
19
|
+
import { Presence } from '../../ui/Presence/index.js';
|
|
20
20
|
import { callIfFn } from '../../utils/callIfFn.js';
|
|
21
21
|
import { getGameImageUrl } from '../../utils/getGameImageUrl.js';
|
|
22
22
|
import { GameLaunchTrigger } from '../GameLaunch/index.js';
|
|
@@ -30,7 +30,10 @@ export function MobileNumberSignIn() {
|
|
|
30
30
|
const localeInfo = useLocaleInfo();
|
|
31
31
|
const mobileNumberParser = useMobileNumberParser();
|
|
32
32
|
const Step1Definition = z.object({
|
|
33
|
-
mobileNumber: z
|
|
33
|
+
mobileNumber: z
|
|
34
|
+
.string()
|
|
35
|
+
.min(1, 'Mobile number is required')
|
|
36
|
+
.superRefine((v, ctx) => {
|
|
34
37
|
if (!mobileNumberParser.validate(v)) {
|
|
35
38
|
ctx.addIssue({
|
|
36
39
|
code: z.ZodIssueCode.custom,
|
|
@@ -85,9 +88,9 @@ export function MobileNumberSignIn() {
|
|
|
85
88
|
: 'Failed to send verification code',
|
|
86
89
|
});
|
|
87
90
|
}
|
|
88
|
-
}), 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(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
}), 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(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { checked: o.field.value, onCheckedChange: (details) => {
|
|
92
|
+
o.field.onChange(details.checked);
|
|
93
|
+
}, 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, {})] }), _jsx(Field.ErrorText, { className: "ml-6 text-xs", children: o.fieldState.error?.message })] })) })] }), _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: () => {
|
|
91
94
|
dialog.setOpen(false);
|
|
92
95
|
}, 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: () => {
|
|
93
96
|
dialog.setOpen(false);
|
|
@@ -70,8 +70,13 @@ export function NameAndPasswordSignIn() {
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
}),
|
|
73
|
-
termsAccepted: z.boolean().
|
|
74
|
-
|
|
73
|
+
termsAccepted: z.boolean().superRefine((v, ctx) => {
|
|
74
|
+
if (!v) {
|
|
75
|
+
ctx.addIssue({
|
|
76
|
+
code: z.ZodIssueCode.custom,
|
|
77
|
+
message: 'You must accept the terms and conditions',
|
|
78
|
+
});
|
|
79
|
+
}
|
|
75
80
|
}),
|
|
76
81
|
});
|
|
77
82
|
const form = useForm({
|
|
@@ -112,9 +117,9 @@ export function NameAndPasswordSignIn() {
|
|
|
112
117
|
signInMutation.reset();
|
|
113
118
|
form.setValue('secretAnswer', '');
|
|
114
119
|
},
|
|
115
|
-
}) }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.name, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx("div", { className: "mt-2 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "text-button-tertiary-fg text-sm font-semibold", children: "Forgot Password" }) })] }) }), signInMutation.data && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
}) }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsx(Field.Root, { disabled: !!signInMutation.data, invalid: !!form.formState.errors.name, className: "mt-xl", children: _jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs("div", { children: [_jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter your password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx("div", { className: "mt-2 flex justify-end", children: _jsx("button", { type: "button", tabIndex: -1, className: "text-button-tertiary-fg text-sm font-semibold", children: "Forgot Password" }) })] }) }), signInMutation.data && (_jsxs(Field.Root, { invalid: !!form.formState.errors.secretAnswer, className: "mt-xl", children: [_jsx(Field.Label, { children: secretQuestion }), _jsx(Field.Input, { placeholder: "Answer the security question", ...form.register('secretAnswer') }), _jsx(Field.ErrorText, { children: form.formState.errors.secretAnswer?.message })] })), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: signInMutation.isPending || authenticateMutation.isPending, children: "Log In" }), _jsx(Controller, { control: form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { invalid: o.fieldState.invalid, className: "mt-xl", children: [_jsxs(Checkbox.Root, { checked: o.field.value, onCheckedChange: (details) => {
|
|
121
|
+
o.field.onChange(details.checked);
|
|
122
|
+
}, 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, {})] }), _jsx(Field.ErrorText, { className: "ml-6 text-xs", children: o.fieldState.error?.message })] })) })] }), _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: () => {
|
|
118
123
|
dialog.setOpen(false);
|
|
119
124
|
}, 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: () => {
|
|
120
125
|
dialog.setOpen(false);
|
|
@@ -4,7 +4,7 @@ import { useDialogContext } from '@ark-ui/react/dialog';
|
|
|
4
4
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
5
5
|
import { ObjectId } from '@opexa/object-id';
|
|
6
6
|
import { useSearchParams } from 'next/navigation';
|
|
7
|
-
import { useState } from 'react';
|
|
7
|
+
import { useRef, useState } from 'react';
|
|
8
8
|
import { Controller, useForm } from 'react-hook-form';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { useShallow } from 'zustand/shallow';
|
|
@@ -71,6 +71,7 @@ export function SignUpForm() {
|
|
|
71
71
|
max: 60,
|
|
72
72
|
duration: 1000 * 60,
|
|
73
73
|
});
|
|
74
|
+
const form2Ref = useRef(null);
|
|
74
75
|
return (_jsxs(_Fragment, { children: [step === 1 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "mt-xl text-center text-lg font-semibold", children: "Create an account" }), _jsx("p", { className: "text-text-secondary-700 mt-xs text-center text-sm", children: "Register instantly and start playing!" }), _jsxs("form", { className: "mt-3xl", onSubmit: step1Form.handleSubmit(async (data) => {
|
|
75
76
|
try {
|
|
76
77
|
await sendVerificationCodeMutation.mutateAsync({
|
|
@@ -87,12 +88,12 @@ export function SignUpForm() {
|
|
|
87
88
|
: 'Failed to send verification code',
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
|
-
}), 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: "Create Account" }), _jsx(Controller, { control: step1Form.control, name: "termsAccepted", render: (o) => (_jsxs(
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
}), 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: "Create Account" }), _jsx(Controller, { control: step1Form.control, name: "termsAccepted", render: (o) => (_jsxs(Field.Root, { className: "mt-xl", invalid: o.fieldState.invalid, children: [_jsxs(Checkbox.Root, { checked: o.field.value, onCheckedChange: (details) => {
|
|
92
|
+
o.field.onChange(details.checked);
|
|
93
|
+
}, 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, {})] }), _jsx(Field.ErrorText, { className: "ml-6 text-xs", children: o.fieldState.error?.message })] })) })] }), _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: () => {
|
|
93
94
|
dialog.setOpen(false);
|
|
94
95
|
signInStore.setOpen(true);
|
|
95
|
-
}, children: "Log In" })] })] })), 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", { className: "mt-5", onSubmit: step2Form.handleSubmit(async ({ verificationCode }) => {
|
|
96
|
+
}, children: "Log In" })] })] })), 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 }) => {
|
|
96
97
|
const id = ObjectId.generate(ObjectType.MemberAccount).toString();
|
|
97
98
|
const { mobileNumber } = step1Form.getValues();
|
|
98
99
|
try {
|
|
@@ -121,13 +122,18 @@ export function SignUpForm() {
|
|
|
121
122
|
step2Form.reset();
|
|
122
123
|
setStep(1);
|
|
123
124
|
}
|
|
124
|
-
catch {
|
|
125
|
+
catch (error) {
|
|
125
126
|
toaster.error({
|
|
126
|
-
title: '
|
|
127
|
+
title: 'Login Failed',
|
|
128
|
+
description: error instanceof Error
|
|
129
|
+
? error.message
|
|
130
|
+
: 'Invalid Verification Code',
|
|
127
131
|
});
|
|
128
132
|
}
|
|
129
133
|
}), 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) => {
|
|
130
134
|
o.field.onChange(details.value);
|
|
135
|
+
}, onValueComplete: () => {
|
|
136
|
+
form2Ref.current?.requestSubmit();
|
|
131
137
|
}, 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:cursor-not-allowed disabled:opacity-75", disabled: cooldown.cooling, onClick: async () => {
|
|
132
138
|
await sendVerificationCodeMutation.mutateAsync({
|
|
133
139
|
channel: 'SMS',
|