-
Notifications
You must be signed in to change notification settings - Fork 2
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
JP Angelle
committed
Jan 19, 2024
1 parent
41aa6a3
commit c57939a
Showing
4 changed files
with
64 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Anchor, Box, Card, Paragraph } from 'grommet' | ||
|
||
export const ExpiredCFGRewardsBanner = () => { | ||
const expirationDate = new Date('2024-01-29T15:01') | ||
const currentDateCET = new Date().toLocaleString('en-US', { timeZone: 'CET' }) | ||
const currentDateCETMillis = new Date(currentDateCET).getTime() | ||
|
||
const isExpired = currentDateCETMillis > expirationDate.getTime() | ||
|
||
if (isExpired) { | ||
const formattedExpirationDate = `${expirationDate.toLocaleString('en-US', { | ||
month: 'short', | ||
day: 'numeric', | ||
year: 'numeric', | ||
})} at ${expirationDate | ||
.toLocaleString('en-US', { hour: 'numeric', minute: 'numeric', hour12: true }) | ||
.toLowerCase()}` | ||
|
||
return ( | ||
<Card | ||
margin={{ top: 'medium', bottom: 'xsmall' }} | ||
pad={{ top: 'xsmall', bottom: 'xsmall', left: 'medium', right: 'medium' }} | ||
style={{ | ||
backgroundColor: '#fff5da', | ||
}} | ||
> | ||
<Box> | ||
<Paragraph> | ||
The Tinlake Reward program has been discontinued by community vote. All unclaimed CFG rewards expired on{' '} | ||
{formattedExpirationDate} CET and can no longer be collected. Read more about the community vote{' '} | ||
<Anchor | ||
href="https://gov.centrifuge.io/t/cp81-unclaimed-tinlake-rewards/5885/4" | ||
label="here" | ||
target="_blank" | ||
/> | ||
. | ||
</Paragraph> | ||
</Box> | ||
</Card> | ||
) | ||
} | ||
|
||
return null | ||
} |
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