Skip to content

Commit

Permalink
add jackpot id
Browse files Browse the repository at this point in the history
  • Loading branch information
imhson committed Mar 25, 2024
1 parent feecd90 commit 1c7fae0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions app/(private)/wish/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ export default function Page() {
}, [jackpotData?.jackpots])

const addGemHandler = (type: string) => {
for (let i = 0; i < jackpotData?.jackpots?.[0]?.slot; i++) {
if (selectedGems[i] == undefined) {
selectedGems[i] = type
break
if (jackpotData?.jackpots && !jackpotData?.jackpots?.[0]?.winning_numbers) {
for (let i = 0; i < jackpotData?.jackpots?.[0]?.slot; i++) {
if (selectedGems[i] == undefined) {
selectedGems[i] = type
break
}
}
setSelectedGems([...selectedGems])
}
setSelectedGems([...selectedGems])
}

const wishHandler = async () => {
Expand Down Expand Up @@ -142,7 +144,7 @@ export default function Page() {
})),
'auto'
)
const res = await wish(jackpotData.jackpots[0].id , tokens)
const res = await wish(jackpotData.jackpots[0].id, tokens)
if (res.data) {
setTimeout(() => {
setSubmittedGems(selectedGems)
Expand Down
2 changes: 1 addition & 1 deletion provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ function ContextProvider({ children }: { children: ReactNode }) {
<NextUIProvider>
<ApolloProvider client={client}>{children}</ApolloProvider>
</NextUIProvider>
<GoogleTagManager gtmId='GTM-K3NWXQS' />
<GoogleTagManager gtmId='GTM-5F456FKK' />
<ToastContainer
position='top-center'
autoClose={3000}
Expand Down

0 comments on commit 1c7fae0

Please sign in to comment.