feat(LOY-61): add confirmation box to close when redeemed a reward

This commit is contained in:
Christian Andolf
2025-02-12 14:22:13 +01:00
parent 962836606e
commit b656023bac
15 changed files with 189 additions and 39 deletions
@@ -2,14 +2,20 @@
import { useIntl } from "react-intl"
import { dt } from "@/lib/dt"
import Countdown from "@/components/Countdown"
import { CheckCircleIcon } from "@/components/Icons"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import useRedeemFlow from "./useRedeemFlow"
import styles from "./redeem.module.css"
export default function TimedRedeemedBadge() {
const intl = useIntl()
const { timeRemaining, setTimeRemaining } = useRedeemFlow()
const duration = dt.duration(timeRemaining)
return (
<>
@@ -21,7 +27,11 @@ export default function TimedRedeemedBadge() {
})}
</Caption>
</div>
<Countdown />
<Countdown
minutes={duration.minutes()}
seconds={duration.seconds()}
onChange={(newTime) => setTimeRemaining(newTime)}
/>
</>
)
}