Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adetyaz committed Nov 9, 2024
1 parent 87faaf4 commit c349571
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/app/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { ClaimNft } from '@/components/claim-nft'
import { toast } from 'react-toastify'
import { VoiceAssistant } from '@/components/voice-assistant'
import { useQueries, useQuery } from '@tanstack/react-query'
import { baseURI, getAvatar, getAvatars, getPhygital, getPhygitals, getWebXR } from '@/utils/queries'
import { AvatarType, PhygitalType, WebXRType } from '@/types/types'
import { getAvatar, getPhygitals, getWebXR } from '@/utils/queries'
import { PhygitalType } from '@/types/types'
import Header from '@/components/header'
import Moralis from 'moralis'
import { ProvenanceAttestation } from '@/components/provenance-attestation'
Expand All @@ -24,7 +24,6 @@ export default function Home({ params }: { params: { id: string } }) {
const [userType, setUserType] = useState('guest')
const [showProvenance, setShowProvenance] = useState(false)
const [notClaimed, setNotClaimed] = useState(false)


const { address } = useAccount()

Expand Down Expand Up @@ -233,7 +232,7 @@ export default function Home({ params }: { params: { id: string } }) {
contractAddress={phygital.contract_address}
/>
</div>
)}
)}
</section>
</main>
)
Expand Down
10 changes: 9 additions & 1 deletion src/components/claim-nft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { toast } from 'react-toastify'
import { useState } from 'react'
import { ConnectWallet } from './connect-wallet'
import { baseURI } from '@/utils/queries'
import { X } from 'lucide-react'

export const ClaimNft = ({
onClose,
Expand Down Expand Up @@ -40,6 +41,10 @@ export const ClaimNft = ({
}
}

const handleClick = () => {
onClose(false)
}

const removePrefix = (uri: string) => {
return uri?.substring(7, uri.length)
}
Expand All @@ -48,8 +53,11 @@ export const ClaimNft = ({
<>
{!claimNft ? (
<div className='relative bg-white p-4 mt-10 md:mt-0 text-black rounded-lg shadow-md'>
<div className='absolute right-4 top-4'>
<X className='text-slate-900 cursor-pointer' onClick={handleClick} role='button' />
</div>
<div className='p-4 space-y-4'>
<div className='flex justify-around'>
<div>
<p className='text-4xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-purple-900 text-center'>
Congratulations!
</p>
Expand Down

0 comments on commit c349571

Please sign in to comment.