34 lines
909 B
TypeScript
34 lines
909 B
TypeScript
"use client";
|
|
|
|
import { useRouter } from "next/navigation";
|
|
|
|
export function PendingApprovals() {
|
|
const router = useRouter();
|
|
// TODO: Fetch pending approvals from contract/backend
|
|
const pendingCount = 0; // Placeholder
|
|
|
|
if (pendingCount === 0) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className="bg-yellow-900/20 border border-yellow-600 rounded-xl p-4 flex justify-between items-center">
|
|
<div>
|
|
<h3 className="font-semibold text-yellow-400">
|
|
{pendingCount} transaction{pendingCount !== 1 ? "s" : ""} pending approval
|
|
</h3>
|
|
<p className="text-sm text-yellow-300/70">
|
|
Review and approve pending transactions
|
|
</p>
|
|
</div>
|
|
<button
|
|
onClick={() => router.push("/approvals")}
|
|
className="px-4 py-2 bg-yellow-600 hover:bg-yellow-700 rounded-lg transition-colors"
|
|
>
|
|
Review
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|
|
|