-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,326 additions
and
156 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.