stacker.news/components/countdown.js
keyan 18910fa2ed Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"
This reverts commit d0314ab73c42ebf85fe2f418dddd681af45dbc55.
2023-07-23 09:16:12 -05:00

14 lines
378 B
JavaScript

import Countdown from 'react-countdown'
export default function SimpleCountdown ({ className, onComplete, date }) {
return (
<span className={className}>
<Countdown
date={date}
renderer={props => <span className='text-monospace'> {props.formatted.minutes}:{props.formatted.seconds}</span>}
onComplete={onComplete}
/>
</span>
)
}