"use client"; import { useState } from "react"; import { Icon } from "@/components/icons"; type ApprovalState = "pending" | "approved" | "refused"; export function ApprovalDemo() { const [state, setState] = useState("pending"); return (
Receiver requests
{state === "pending" ? "NEW REQUEST" : state === "approved" ? "IN PROGRESS" : "REQUEST CLOSED"}

{state === "pending" && "Maya’s phone wants to receive"} {state === "approved" && "Sending securely to Maya"} {state === "refused" && "Request refused"}

Summer photos 42 files · 1.8 GB {state === "approved" && 68%}
{state === "pending" && (
)} {state === "approved" && (
Direct connection
)} {state === "refused" && (

This device was not given access.

)}
Approval is required by default
); }