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

View File

@@ -1,4 +1,4 @@
import type { Dispatch, ReactNode, SetStateAction } from "react"
import type { Dispatch, SetStateAction } from "react"
import type { z } from "zod"
import type { DynamicContent } from "@/types/trpc/routers/contentstack/blocks"
@@ -42,9 +42,17 @@ export interface ScriptedRewardTextProps {
export type RedeemModalState = "unmounted" | "hidden" | "visible"
export type RedeemStep = "initial" | "confirmation" | "redeemed"
export type RedeemStep =
| "initial"
| "confirmation"
| "redeemed"
| "confirm-close"
export type RedeemFlowContext = {
reward: RewardWithRedeem | null
redeemStep: RedeemStep
setRedeemStep: Dispatch<SetStateAction<RedeemStep>>
defaultTimeRemaining: number
timeRemaining: number
setTimeRemaining: Dispatch<SetStateAction<number>>
}