feat: add conditional rendering in ApprovalCard component to prevent rendering when a decision has been made and is not a rejection

This commit is contained in:
Anish Sarkar 2026-03-20 16:41:30 +05:30
parent f4da05d0ea
commit 9fbf0992f3
8 changed files with 16 additions and 0 deletions

View file

@ -165,6 +165,8 @@ function ApprovalCard({
return () => window.removeEventListener("keydown", handler);
}, [handleApprove]);
if (decided && decided !== "reject") return null;
return (
<div className="my-4 max-w-lg overflow-hidden rounded-2xl border bg-muted/30 transition-all duration-300">
{/* Header */}