Skip to content

Commit 9d4bc3b

Browse files
Refactor affiliates table
Remove "code de suivi" column and move the code under the email in the affiliates table.
1 parent c295b5a commit 9d4bc3b

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

src/components/AffiliateTableRow.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,16 @@ interface AffiliateTableRowProps {
1919
export const AffiliateTableRow = ({ affiliate, onEdit, onCopyTrackingLink, onDelete }: AffiliateTableRowProps) => {
2020
return (
2121
<TableRow className="hover:bg-slate-50">
22-
<TableCell className="w-[30%] max-w-0 overflow-hidden">
22+
<TableCell className="w-[35%] max-w-0 overflow-hidden">
2323
<div className="space-y-1">
2424
<div className="font-medium text-slate-900 truncate">{affiliate.name}</div>
2525
<Badge variant="outline" className="text-xs truncate max-w-full">
2626
<span className="truncate">{affiliate.email}</span>
2727
</Badge>
28-
</div>
29-
</TableCell>
30-
<TableCell className="w-[15%] max-w-0 overflow-hidden">
31-
<div className="flex items-center gap-1 text-sm text-slate-600">
32-
<Hash className="h-3 w-3 flex-shrink-0" />
33-
<span className="font-mono truncate text-xs">{affiliate.trackingCode}</span>
28+
<div className="flex items-center gap-1 text-xs text-slate-500 mt-1">
29+
<Hash className="h-3 w-3 flex-shrink-0" />
30+
<span className="font-mono truncate">{affiliate.trackingCode}</span>
31+
</div>
3432
</div>
3533
</TableCell>
3634
<TableCell className="w-[15%] max-w-0 overflow-hidden">
@@ -41,10 +39,10 @@ export const AffiliateTableRow = ({ affiliate, onEdit, onCopyTrackingLink, onDel
4139
</div>
4240
)}
4341
</TableCell>
44-
<TableCell className="w-[15%] max-w-0 overflow-hidden">
42+
<TableCell className="w-[20%] max-w-0 overflow-hidden">
4543
<AffiliateStatsCell affiliateId={affiliate.id} commissionRate={affiliate.commissionRate} />
4644
</TableCell>
47-
<TableCell className="w-[15%] max-w-0 overflow-hidden">
45+
<TableCell className="w-[20%] max-w-0 overflow-hidden">
4846
<StripeConnectButton affiliate={affiliate} />
4947
</TableCell>
5048
<TableCell className="w-[10%] max-w-0 overflow-hidden">

src/components/AffiliatesManagementTable.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ export const AffiliatesManagementTable = ({ campaignId, onCopyTrackingLink }: Af
6868
<Table className="w-full table-fixed" style={{ width: '100%', maxWidth: '100%' }}>
6969
<TableHeader>
7070
<TableRow className="bg-slate-50">
71-
<TableHead className="w-[30%] min-w-0">Affilié</TableHead>
72-
<TableHead className="w-[15%] min-w-0">Code de suivi</TableHead>
71+
<TableHead className="w-[35%] min-w-0">Affilié</TableHead>
7372
<TableHead className="w-[15%] min-w-0">Date d'ajout</TableHead>
74-
<TableHead className="w-[15%] min-w-0">Performances</TableHead>
75-
<TableHead className="w-[15%] min-w-0">Paiements</TableHead>
73+
<TableHead className="w-[20%] min-w-0">Performances</TableHead>
74+
<TableHead className="w-[20%] min-w-0">Paiements</TableHead>
7675
<TableHead className="w-[10%] min-w-0 text-right">Actions</TableHead>
7776
</TableRow>
7877
</TableHeader>

0 commit comments

Comments
 (0)