Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
imhson committed Jul 8, 2024
2 parents 0afb08f + 88d3165 commit a05a046
Show file tree
Hide file tree
Showing 26 changed files with 1,326 additions and 156 deletions.
Binary file added app/(private)/assets/burn-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/(private)/assets/burn-inactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/(private)/assets/gem-burn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/(private)/assets/redeem-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/(private)/assets/redeem-inactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions app/(private)/burn/assets/prizeBackdrop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions app/(private)/burn/assets/prizeBackdropMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions app/(private)/burn/components/prizeModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
'use client'

import NoBackgroundModal from '@/components/modal/giftModal'
import Image from 'next/image'
import BackdropMobile from '../assets/prizeBackdropMobile.svg'
import Backdrop from '../assets/prizeBackdrop.svg'
import { Bangkok, Context } from '@/provider'
import { useContext } from 'react'
import { formatNumber } from '@/utils'
export default function ResultModal({ prize, isOpen, onOpenChange, onClose }: any) {
const { account } = useContext(Context)
return (
<NoBackgroundModal isOpen={isOpen} onOpenChange={onOpenChange}>
<div>
<Image src={BackdropMobile} alt='' className='md:hidden' />
<Image src={Backdrop} alt='' className='hidden md:block' />
{prize ? (
<div className={`absolute left-1/2 -translate-x-1/2 top-[121px] text-xl`}>
<div className={`${Bangkok.className} flex flex-col items-center md:flex-row`}>
<span>Congratulations!</span>
<span className='text-[#FFE346] ml-[1ch]'>{account?.username}</span>
</div>
<div className='text-sm leading-6 font-bold text-center mt-8 flex items-center justify-center'>
<span className='text-5xl leading-6 -translate-y-1 mr-[.5ch]'>{formatNumber(prize)}</span>
<span>AURA</span>
</div>
</div>
) : (
<div className={`absolute left-1/2 -translate-x-1/2 top-[145px] text-xl text-[#FB5050] ${Bangkok.className}`}>
Good luck next time!
</div>
)}
</div>
</NoBackgroundModal>
)
}
411 changes: 411 additions & 0 deletions app/(private)/burn/page.tsx

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/(private)/components/revealForgingResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const RevealForgingResult = ({
</div>
<Link
target='_blank'
href={`${getConfig().AURASCAN_ENDPOINT}/tokens/token-nft/${prize.contractAddress}/${prize.tokenId}`}
href={`${getConfig().AURASCAN_ENDPOINT}/tokens/cw721/${prize.contractAddress}/${prize.tokenId}`}
className='text-xs mt-2'>
ID: <span>{prize.tokenId}</span>
</Link>
Expand Down Expand Up @@ -118,7 +118,7 @@ export const RevealForgingResult = ({
</div>
<Link
target='_blank'
href={`${getConfig().AURASCAN_ENDPOINT}/tokens/token-nft/${prize.contractAddress}/${prize.tokenId}`}
href={`${getConfig().AURASCAN_ENDPOINT}/tokens/cw721/${prize.contractAddress}/${prize.tokenId}`}
className='text-xs mt-2'>
ID: <span>{prize.tokenId}</span>
</Link>
Expand Down
24 changes: 24 additions & 0 deletions app/(private)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import ForgeActive from '@/app/(private)/assets/force-active.png'
import ForgeInactive from '@/app/(private)/assets/force-inactive.png'
import RedeemActive from '@/app/(private)/assets/redeem-active.png'
import RedeemInactive from '@/app/(private)/assets/redeem-inactive.png'
import BurnActive from '@/app/(private)/assets/burn-active.png'
import BurnInactive from '@/app/(private)/assets/burn-inactive.png'
import QuestActive from '@/app/(private)/assets/quest-active.png'
import QuestInactive from '@/app/(private)/assets/quest-inactive.png'
import Active from '@/app/(private)/assets/active-tab.png'
Expand Down Expand Up @@ -82,6 +84,28 @@ export default function Layout({ children }: { children: ReactNode }) {
className={` hidden w-[112px] ${pathname != '/redeem' ? 'md:block' : ''}`}
/>
</div>
{/* <div
className='cursor-pointer'
onClick={() => {
router.push('/burn')
}}>
<div className='relative md:hidden cursor-pointer'>
<Image src={pathname == '/burn' ? Active : Inactive} alt='' className={`w-[106px]`} />
<div
className={`${Bangkok.className} absolute inset-0 grid place-items-center ${
pathname == '/burn' ? 'text-[#FFB438]' : 'text-[#828282]'
}`}>
<div className='capitalize'>Burn</div>
</div>
</div>
<Image src={BurnActive} alt='' className={` hidden w-[157px] ${pathname == '/burn' ? 'md:block' : ''}`} />{' '}
<Image
src={BurnInactive}
alt=''
id='screen_Burn'
className={` hidden w-[112px] ${pathname != '/burn' ? 'md:block' : ''}`}
/>
</div> */}
<div
className='cursor-pointer'
onClick={() => {
Expand Down
2 changes: 1 addition & 1 deletion app/(private)/redeem/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default function Page() {
</div>
<Link
target='_blank'
href={`${getConfig().AURASCAN_ENDPOINT}/tokens/token-nft/${prize.contract}/${prize.tokenId}`}
href={`${getConfig().AURASCAN_ENDPOINT}/tokens/cw721/${prize.contract}/${prize.tokenId}`}
className='text-xs mt-2'>
ID: <span>{prize.tokenId}</span>
</Link>
Expand Down
9 changes: 9 additions & 0 deletions app/(public)/connect/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 12 additions & 14 deletions app/(public)/connect/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client'
import DragonLogo from '@/components/homeComponents/assets/dragon-logo.svg'
import DragonLogo from './assets/logo.svg'
import { Bangkok, Context } from '@/provider'
import { useChain, useWallet } from '@cosmos-kit/react'
import { WalletStatus } from 'cosmos-kit'
Expand All @@ -24,14 +24,14 @@ export default function Connect() {
const { connect, address, chain, closeView, wallet, disconnect } = useChain(config.COSMOSKIT_CHAINKEY)
const { status: globalStatus, mainWallet } = useWallet()
const { refetch } = useQuery(GET_USER_DATA)
const connectXHandler = () => {
window.location.href = `${config.REST_API_ENDPOINT}/auth/twitter`
}
useEffect(() => {
if (account?.wallet_address && address == account.wallet_address) {
redirect('/')
closeView()
}
}, [account?.wallet_address, address])
const connectXHandler = () => {
window.location.href = `${config.REST_API_ENDPOINT}/auth/twitter`
}
useEffect(() => {
if (account && !account?.wallet_address && globalStatus == WalletStatus.Connected) {
linkWalletHandler()
Expand Down Expand Up @@ -97,12 +97,10 @@ ${Date.now()}`
return (
<main className='relative min-h-screen'>
<div className='flex flex-col items-center pt-[130px] px-1 text-center'>
<Image src={DragonLogo} alt='' className='w-[110px]' />
<div
className={`${Bangkok.className} mt-5 text-[#EE3724] uppercase drop-shadow-[0px_3.276px_3.276px_rgba(0,0,0,0.50)] text-[52px] font-bold leading-tight tracking-[0.524px] text-stroke`}>
Gem Forge
<Image src={DragonLogo} alt='' className='max-w-[508px] w-full' />
<div className={`text-[#F9C174] text-xl font-bold uppercase tracking-[14px] mt-4`}>
Quest for the Dragon's Wish
</div>
<div className={`text-[#F9C174] text-xl font-bold uppercase tracking-[14px]`}>Quest for the Dragon's Wish</div>
{account ? (
account.wallet_address ? (
address ? (
Expand All @@ -121,7 +119,7 @@ ${Date.now()}`
</span>
{shorten(address, 5, 5)}
</div>
<FilledButton className='mt-6' onClick={() => router.push('/')} id="continue" >
<FilledButton className='mt-6' onClick={() => router.push('/')} id='continue'>
Continue
</FilledButton>
</>
Expand All @@ -140,7 +138,7 @@ ${Date.now()}`
</span>
{shorten(address)}
</div>
<FilledButton className='mt-6' onClick={() => disconnect()} id="disconnect_wallet">
<FilledButton className='mt-6' onClick={() => disconnect()} id='disconnect_wallet'>
Disconnect
</FilledButton>
<div className='mt-6 italic text-sm text-[#FEA768]'>
Expand All @@ -151,7 +149,7 @@ ${Date.now()}`
)
) : (
<>
<FilledButton className='mt-16' onClick={() => connect()} id="connect_wallet">
<FilledButton className='mt-16' onClick={() => connect()} id='connect_wallet'>
Connect Wallet
</FilledButton>
<div className='mt-6 italic text-sm text-[#FEA768]'>
Expand All @@ -162,7 +160,7 @@ ${Date.now()}`
)
) : (
<>
<FilledButton className='mt-16' onClick={() => connect()} id="connect_wallet">
<FilledButton className='mt-16' onClick={() => connect()} id='connect_wallet'>
Connect Wallet
</FilledButton>
<div className='mt-6 italic text-sm text-[#FEA768]'>
Expand Down
Binary file added assets/chest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions components/button/filled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function FilledButton({
classNames={{
label: 'text-[#FFF8D5]',
indicator: 'stroke-[#8E0B09]',
base: '-my-1',
base: '-my-1 mx-auto',
}}
size='sm'
/>
Expand All @@ -60,7 +60,7 @@ export default function FilledButton({
classNames={{
label: 'text-[#FFF8D5]',
indicator: 'stroke-[#8E0B09]',
base: '-my-1',
base: '-my-1 mx-auto',
}}
size='sm'
/>
Expand Down
44 changes: 8 additions & 36 deletions components/gem/gemWithFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,31 @@ export default function GemWithFrame({
| 'w5'
| 'w6'
| 'w7'
| 'sw1'
| 'sw'
| 'b1'
| 'b2'
| 'b3'
| 'b4'
| 'b5'
| 'b6'
| 'b7'
| 'sb1'
| 'sb'
| 'g1'
| 'g2'
| 'g3'
| 'g4'
| 'g5'
| 'g6'
| 'g7'
| 'sg1'
| 'sg'
| 'r1'
| 'r2'
| 'r3'
| 'r4'
| 'r5'
| 'r6'
| 'r7'
| 'sr1'
| 'sr'
}) {
switch (type[0]) {
case 's':
Expand All @@ -78,29 +78,15 @@ export default function GemWithFrame({
<div
className={`bg-gradient-to-b from-[#CECECE] via-[#FFFFFF] to-[#B0B0B0] rounded-md w-[60px] h-[60px] p-[3px]`}>
<div className='bg-[radial-gradient(50%_50%_at_50%_50%,#6E6E6E63_0.07%,#11111163_100%)] w-full h-full grid place-items-center rounded-[4px] shadow-[0px_4px_10px_0px_rgba(0,0,0,0.25)_inset,0px_4px_4px_0px_rgba(0,0,0,0.25)_inset]'>
{(function () {
switch (type[2]) {
case '1':
return <Image src={SWhite1} alt='' className='w-14 h-14' />
default:
return <></>
}
})()}
<Image src={SWhite1} alt='' className='w-14 h-14' />
</div>
</div>
)
case 'b':
return (
<div className={`bg-gradient-to-b from-[#AFD4FF] to-[#00B8C4] rounded-md w-[60px] h-[60px] p-[3px]`}>
<div className='bg-[radial-gradient(50%_50%_at_50%_50%,#90E4FF_0.07%,#006576_100%)] w-full h-full grid place-items-center rounded-[4px] shadow-[0px_4px_10px_0px_rgba(0,0,0,0.25)_inset,0px_4px_4px_0px_rgba(0,0,0,0.25)_inset]'>
{(function () {
switch (type[2]) {
case '1':
return <Image src={SBlue1} alt='' className='w-14 h-14' />
default:
return <></>
}
})()}
<Image src={SBlue1} alt='' className='w-14 h-14' />
</div>
</div>
)
Expand All @@ -109,14 +95,7 @@ export default function GemWithFrame({
<div
className={`bg-gradient-to-b from-[#ECAB2C] via-[#FFEFC0] to-[#ECAB2C] rounded-md w-[60px] h-[60px] p-[3px]`}>
<div className='bg-[radial-gradient(50%_50%_at_50%_50%,#FBE1AF_0.07%,#956233_100%)] w-full h-full grid place-items-center rounded-[4px] shadow-[0px_4px_10px_0px_rgba(0,0,0,0.25)_inset,0px_4px_4px_0px_rgba(0,0,0,0.25)_inset]'>
{(function () {
switch (type[2]) {
case '1':
return <Image src={SGold1} alt='' className='w-14 h-14' />
default:
return <></>
}
})()}
<Image src={SGold1} alt='' className='w-14 h-14' />
</div>
</div>
)
Expand All @@ -125,14 +104,7 @@ export default function GemWithFrame({
<div
className={`bg-gradient-to-b from-[#952D33] via-[#FFB6D5] to-[#992229] rounded-md w-[60px] h-[60px] p-[3px]`}>
<div className='bg-[radial-gradient(50%_50%_at_50%_50%,#ED8183_0.07%,#663435_100%)] w-full h-full grid place-items-center rounded-[4px] shadow-[0px_4px_10px_0px_rgba(0,0,0,0.25)_inset,0px_4px_4px_0px_rgba(0,0,0,0.25)_inset]'>
{(function () {
switch (type[2]) {
case '1':
return <Image src={SRed1} alt='' className='w-14 h-14' />
default:
return <></>
}
})()}
<Image src={SRed1} alt='' className='w-14 h-14' />
</div>
</div>
)
Expand Down
Loading

0 comments on commit a05a046

Please sign in to comment.