feat(LOY-61): add confirmation box to close when redeemed a reward
This commit is contained in:
@@ -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)}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user