import { Text } from '@chakra-ui/core';
import ReactCountdown, { zeroPad } from 'react-countdown';
import { If } from '~/components';
import { useColorValue } from '~/context';
const Renderer = (props: IRenderer) => {
const { hours, minutes, seconds, completed, text } = props;
let time = [zeroPad(seconds)];
minutes !== 0 && time.unshift(zeroPad(minutes));
hours !== 0 && time.unshift(zeroPad(hours));
const bg = useColorValue('black', 'white');
return (
<>
{text}
{time.join(':')}
>
);
};
export const Countdown = (props: ICountdown) => {
const { timeout, text } = props;
const then = timeout * 1000;
return (
}
/>
);
};