Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
imhson committed Mar 23, 2024
1 parent 768837a commit 307d300
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
10 changes: 7 additions & 3 deletions app/(private)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,13 @@ export default function Home() {
onOpen()
} else {
toast(
`Reveal gem with request ${
result?.data?.data?.requestId
} failed. Please contact us via Discord or Telegram. Respone: ${JSON.stringify(result?.data)}`,
result?.data?.data?.requestId
? `Reveal gem with request ${
result?.data?.data?.requestId
} failed. Please contact us via Discord or Telegram. Respone: ${JSON.stringify(result?.data)}`
: `Can not fetch your request ID. Please contact us via Discord or Telegram. Respone: ${JSON.stringify(
result?.data
)}`,
{
type: 'error',
}
Expand Down
6 changes: 3 additions & 3 deletions app/(private)/quests/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import TopBarSide from './assets/top-bar-side.svg'
import { Bangkok } from '@/provider'
import DragonSide from './assets/dragon-side.svg'
import { useQuery } from '@apollo/client'
import { GET_CAMPAIGN } from '@/services'
import { GET_QUESTS } from '@/services'
import QuestItem from './items'
import { Quest } from '@/model/quest'
export default function Page() {
const { data } = useQuery(GET_CAMPAIGN)
const { data } = useQuery(GET_QUESTS)

return (
<div className='relative w-full px-5 mt-5 md:px-0 md:mt-0'>
<div className='w-full relative h-3 bg-[conic-gradient(from_180deg_at_50%_50%,#EF6608_60.48818528652191deg,#F8BD25_183.23987245559692deg,#AF3006_338.95015239715576deg)] rounded-[3px]'>
Expand Down
14 changes: 13 additions & 1 deletion app/(private)/wish/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,20 @@ export default function Page() {
))}
</div>

<div className='italic text-xs text-[#FFF7C4] text-center mt-1'>
{(function () {
switch (jackpotData?.jackpots?.[0]?.max_star) {
case 2:
return 'At this phase, you can only submit 1-star & 2-star gems.'

default:
return ''
}
})()}
</div>

<FilledButton
className='mt-8'
className='mt-5'
disabled={selectedGems.filter((g) => g).length != jackpotData?.jackpots?.[0]?.slot}
onClick={wishHandler}
isLoading={loading}>
Expand Down
9 changes: 6 additions & 3 deletions services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,25 @@ export const GET_TXS_HISTORY = gql`
}
}
`
export const GET_CAMPAIGN = gql`
export const GET_QUESTS = gql`
query campaigns {
items: campaigns {
items: campaigns(where: { status: { _eq: "active" } }) {
description
id
title
code
campaign_social_actions(where: { campaign: { status: { _eq: "active" } } }) {
campaign_social_actions {
id
target
social_action {
id
name
social
__typename
}
__typename
}
__typename
}
}
`
Expand Down

0 comments on commit 307d300

Please sign in to comment.