From e9827ca4e2d17e086e74259c9b266371028b2585 Mon Sep 17 00:00:00 2001 From: Maximilian Schneider Date: Wed, 7 Jul 2021 13:31:48 +0200 Subject: [PATCH] fix time display --- components/PoolCountdown.tsx | 18 ++++++++++-------- components/PoolInfoCards.tsx | 6 +++--- hooks/usePool.tsx | 4 ++++ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/components/PoolCountdown.tsx b/components/PoolCountdown.tsx index f0050b4..6b30be3 100644 --- a/components/PoolCountdown.tsx +++ b/components/PoolCountdown.tsx @@ -1,6 +1,7 @@ import usePool from '../hooks/usePool' import Countdown from 'react-countdown' import moment from 'moment' +import { ClockIcon } from '@heroicons/react/outline' const PoolCountdown = (props: { date: moment.Moment }) => { const { endIdo, endDeposits } = usePool() @@ -13,17 +14,18 @@ const PoolCountdown = (props: { date: moment.Moment }) => { return

{message}

} else { return ( -
- +
+ + + {/* */} {hours < 10 ? `0${hours}` : hours} - - : - + {/* */}: + {/* */} {minutes < 10 ? `0${minutes}` : minutes} - - : - + {/* */}: + {/* */} {seconds < 10 ? `0${seconds}` : seconds} + {/* */}
) diff --git a/components/PoolInfoCards.tsx b/components/PoolInfoCards.tsx index 9d98f46..f8a8acc 100644 --- a/components/PoolInfoCards.tsx +++ b/components/PoolInfoCards.tsx @@ -30,7 +30,7 @@ const PoolInfoCards = () => {
- MNGO + MNGO
{vaults.mangoBalance}
@@ -44,7 +44,7 @@ const PoolInfoCards = () => { width="20" height="20" src="/icons/usdc.svg" - className={`mr-2`} + className={`mr-1`} />{' '}
{vaults.usdcBalance} @@ -59,7 +59,7 @@ const PoolInfoCards = () => { width="20" height="20" src="/icons/usdc.svg" - className={`mr-2`} + className={`mr-1`} />{' '}
{vaults.estimatedPrice.substring(0, 9)} diff --git a/hooks/usePool.tsx b/hooks/usePool.tsx index 666f8fe..4686c06 100644 --- a/hooks/usePool.tsx +++ b/hooks/usePool.tsx @@ -9,5 +9,9 @@ export default function usePool() { ? moment.unix(pool.endDepositsTs.toNumber()) : undefined + // // override for testing + // endDeposits = moment().add(1, 'days') + // endIdo = moment().add(2, 'days') + return { pool, startIdo, endIdo, endDeposits } }