add timezone to lead page

This commit is contained in:
Maximilian Schneider 2021-08-04 19:09:32 +02:00
parent 2d3b3f1490
commit c99f5de67a
3 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import GradientText from './GradientText'
import usePool from '../hooks/usePool'
import moment from 'moment-timezone'
const HeroSectionLead = () => {
const { startIdo } = usePool()
@ -13,7 +14,9 @@ const HeroSectionLead = () => {
<GradientText>WEN</GradientText> TOKEN?
</h2>
<p className="mb-8 text-2xl">
{startIdo?.format('dddd, MMMM Do YYYY, h:mm:ss a')}
{startIdo
?.tz(moment.tz.guess())
?.format('dddd, MMMM Do YYYY, h:mm:ss A z')}
</p>
</div>
</div>

View File

@ -31,6 +31,7 @@
"@solana/web3.js": "^1.5.0",
"immer": "^9.0.1",
"moment": "^2.29.1",
"moment-timezone": "^0.5.33",
"next": "latest",
"next-themes": "^0.0.14",
"rc-slider": "^9.7.2",

View File

@ -4227,7 +4227,14 @@ modern-normalize@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/modern-normalize/-/modern-normalize-1.0.0.tgz#539d84a1e141338b01b346f3e27396d0ed17601e"
moment@^2.29.1:
moment-timezone@^0.5.33:
version "0.5.33"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.33.tgz#b252fd6bb57f341c9b59a5ab61a8e51a73bbd22c"
integrity sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==
dependencies:
moment ">= 2.9.0"
"moment@>= 2.9.0", moment@^2.29.1:
version "2.29.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==