Implement mock View and Download actions for KYC documents

This commit is contained in:
CycroftX
2026-02-03 22:56:19 +05:30
parent bee1882867
commit 5d5f1cd494

View File

@@ -40,6 +40,16 @@ export function KYCReviewSheet({ partner, open, onOpenChange }: KYCReviewSheetPr
setTimeout(() => onOpenChange(false), 1500);
};
const handleViewDocument = (docName: string) => {
toast.info(`Opening preview for ${docName}...`);
// In a real app, this would open a modal with the document preview
};
const handleDownloadDocument = (docName: string) => {
toast.success(`Downloading ${docName}...`);
// In a real app, this would trigger a file download
};
const getStatusIcon = (status: PartnerDocument['status']) => {
switch (status) {
case 'Verified': return <CheckCircle2 className="h-4 w-4 text-success" />;
@@ -86,10 +96,20 @@ export function KYCReviewSheet({ partner, open, onOpenChange }: KYCReviewSheetPr
</div>
</div>
<div className="flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity">
<Button variant="ghost" size="icon" className="h-8 w-8 text-muted-foreground hover:text-foreground">
<Button
variant="ghost"
size="icon"
className="h-8 w-8 text-muted-foreground hover:text-foreground"
onClick={() => handleViewDocument(doc.name)}
>
<Eye className="h-4 w-4" />
</Button>
<Button variant="ghost" size="icon" className="h-8 w-8 text-muted-foreground hover:text-foreground">
<Button
variant="ghost"
size="icon"
className="h-8 w-8 text-muted-foreground hover:text-foreground"
onClick={() => handleDownloadDocument(doc.name)}
>
<Download className="h-4 w-4" />
</Button>
</div>