feat: enable mint countdown

This commit is contained in:
jinhojang6 2024-12-03 21:43:43 +09:00
parent e0fa21f83a
commit ed3c64fb2a
No known key found for this signature in database
GPG Key ID: 1762F21FE8B543F8

View File

@ -10,7 +10,7 @@ const Toast: React.FC = () => {
const userInfo = useAtomValue(userInfoAtom)
useEffect(() => {
const targetTime = new Date('2024-11-04T13:00:00Z').getTime()
const targetTime = new Date('2024-12-16T13:00:00Z').getTime()
const formatTime = (timeInSeconds: number) => {
const days = Math.floor(timeInSeconds / (3600 * 24))
@ -58,7 +58,19 @@ const Toast: React.FC = () => {
</button>
</div>
</ToastContainer>
) : null
) : (
<ToastContainer showTopToast={showTopToast}>
<>
Logos Ordinals Mint Begins 16th December, 2024 at 1PM UTC
<TimeRemaining>Time remaining: {time}</TimeRemaining>
</>
<div>
<button className="close-button" onClick={() => setShowTopToast(false)}>
<img src="/assets/close-orange.svg" alt="close" />
</button>
</div>
</ToastContainer>
)
}
const ToastContainer = styled.div<{ showTopToast: boolean }>`
@ -113,4 +125,8 @@ const ToastContainer = styled.div<{ showTopToast: boolean }>`
}
`
const TimeRemaining = styled.div`
margin-left: 20px;
`
export default Toast