-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from HaloDAO/develop
Develop
- Loading branch information
Showing
23 changed files
with
2,787 additions
and
1,062 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
const GradientCard = ({ children }: any) => { | ||
return <div className="w-full h-auto rounded-md md:rounded-xl text-white p-3 bg-epochReleaseCard">{children}</div> | ||
} | ||
|
||
export default GradientCard |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import React from 'react' | ||
import EpochCharacter from '../../../assets/svg/epochCharacter.svg' | ||
import GradientCard from './GradientCard' | ||
import { CurrentEpoch } from '../../../halo-hooks/useEpochCountdown' | ||
import { useActiveWeb3React } from '../../../hooks' | ||
import { ChainId } from '@halodao/sdk' | ||
|
||
interface TimeObject { | ||
event: boolean | ||
content: Record<string, string> | ||
countdown?: CurrentEpoch | ||
} | ||
|
||
const EpochReleaseTimerCard = ({ event, content, countdown }: TimeObject) => { | ||
const { chainId } = useActiveWeb3React() | ||
const ConvertToString = (x: any) => { | ||
return x.toString() | ||
} | ||
const IfDoubleDigit = (str: string) => { | ||
const strLength = str.length | ||
return strLength === 1 | ||
} | ||
return ( | ||
<> | ||
<GradientCard> | ||
<div className="flex justify-center flex-wrap"> | ||
<div className="flex flex-col justify-around"> | ||
{event ? ( | ||
<> | ||
<div className="font-semibold text-base leading-8">{content.title}</div> | ||
<div className="w-full h-auto flex flex-row justify-around gap-x-2.5"> | ||
<div className="flex flex-col w-20"> | ||
<p className="font-bold text-xs text-center">Days</p> | ||
<h2 className="font-normal text-center text-6xl text-primary-yellow font-fredoka"> | ||
{IfDoubleDigit(ConvertToString(countdown?.days)) ? `0${countdown?.days}` : countdown?.days} | ||
</h2> | ||
</div> | ||
<div className="flex flex-col w-20"> | ||
<p className="font-bold text-xs text-center">Hours</p> | ||
<h2 className="font-normal text-center text-6xl text-primary-yellow font-fredoka"> | ||
{' '} | ||
{IfDoubleDigit(ConvertToString(countdown?.hours)) ? `0${countdown?.hours}` : countdown?.hours} | ||
</h2> | ||
</div> | ||
<div className="flex flex-col w-20"> | ||
<p className="font-bold text-xs text-center">Minutes</p> | ||
<h2 className="font-normal text-center text-6xl text-primary-yellow font-fredoka"> | ||
{IfDoubleDigit(ConvertToString(countdown?.minutes)) | ||
? `0${countdown?.minutes}` | ||
: countdown?.minutes} | ||
</h2> | ||
</div> | ||
</div> | ||
</> | ||
) : ( | ||
<> | ||
<div className="font-semibold text-base leading-8">{content.title}</div> | ||
<div className="font-fredoka font-normal text-4xl text-primary-yellow">{content?.liquidity}</div> | ||
</> | ||
)} | ||
</div> | ||
<img className="h-155.61 hidden sm:block" alt="" src={EpochCharacter} /> | ||
</div> | ||
<div className="flex flex-col md:flex-row text-center md:text-left mx-4 space-y-2 md:space-y-0 mt-4 justify-between"> | ||
<div className="flex flex-col"> | ||
<p className="text-12px bold ">DEPOSIT IN POOL </p> | ||
<h4 className="text-lg">{content.deposit}</h4> | ||
</div> | ||
{chainId !== ChainId.MAINNET && ( | ||
<div className="flex justify-center md:justify-end items-end py-1"> | ||
<span className="text-gray-300 bottom-0 text-12px">(Ethereum Mainnet)</span> | ||
</div> | ||
)} | ||
</div> | ||
</GradientCard> | ||
</> | ||
) | ||
} | ||
|
||
export default EpochReleaseTimerCard |
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,7 @@ | ||
import React from 'react' | ||
|
||
const GradientCard = ({ children }: any) => { | ||
return <div className="w-full h-auto rounded-md md:rounded-xl text-white p-3 bg-epochReleaseCard">{children}</div> | ||
} | ||
|
||
export default GradientCard |
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.