From 8f12477cc17a34cf6ed17e5297571c7461c55352 Mon Sep 17 00:00:00 2001 From: aeolian <94939382+aeolianeth@users.noreply.github.com> Date: Wed, 27 Nov 2024 20:58:05 +1000 Subject: [PATCH] feat: countdown to first cycle --- .../CyclesPayoutsTab/CountdownCallout.tsx | 24 +++++++++++++++++++ src/locales/messages.pot | 3 +++ .../CyclesPayoutsPanel/CyclesPayoutsPanel.tsx | 19 ++++++++------- .../components/CurrentUpcomingSubPanel.tsx | 10 ++++++-- .../hooks/useCurrentUpcomingSubPanel.ts | 4 ++++ 5 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 src/components/Project/ProjectTabs/CyclesPayoutsTab/CountdownCallout.tsx diff --git a/src/components/Project/ProjectTabs/CyclesPayoutsTab/CountdownCallout.tsx b/src/components/Project/ProjectTabs/CyclesPayoutsTab/CountdownCallout.tsx new file mode 100644 index 0000000000..86cd8186b7 --- /dev/null +++ b/src/components/Project/ProjectTabs/CyclesPayoutsTab/CountdownCallout.tsx @@ -0,0 +1,24 @@ +import { ClockIcon } from '@heroicons/react/24/outline' +import { Trans } from '@lingui/macro' +import { useCountdownClock } from 'components/Project/hooks/useCountdownClock' +import { twMerge } from 'tailwind-merge' + +export function CountdownCallout({ + cycleStart, +}: { + cycleStart: number | undefined +}) { + const { remainingTimeText } = useCountdownClock(cycleStart) + + return ( +