"use client" import { useIntl } from "react-intl" import { dt } from "@scandic-hotels/common/dt" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Countdown from "@/components/Countdown" 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 ( <>
{intl.formatMessage({ id: "rewards.redeemed.validThrough", defaultMessage: "Redeemed & valid through:", })}
setTimeRemaining(newTime)} /> ) }