import * as React from "react";
import Countdown, { zeroPad } from "react-countdown";
import { Text, useColorMode } from "@chakra-ui/core";
const bg = { dark: "white", light: "black" };
const Renderer = ({ hours, minutes, seconds, completed, props }) => {
if (completed) {
return ;
} else {
let time = [zeroPad(seconds)];
minutes !== 0 && time.unshift(zeroPad(minutes));
hours !== 0 && time.unshift(zeroPad(hours));
return (
{props.text}
{time.join(":")}
);
}
};
const CacheTimeout = ({ timeout, text }) => {
const then = timeout * 1000;
const { colorMode } = useColorMode();
return (
);
};
CacheTimeout.displayName = "CacheTimeout";
export default CacheTimeout;