Skip to content

Commit 91eb0f3

Browse files
committed
fix: Better highlight warnings in SecurityWarningBanner.tsx
1 parent 863e784 commit 91eb0f3

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

apps/web/src/components/SecurityWarningBanner.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ export function SecurityWarningBanner({status}: SecurityWarningBannerProps) {
1313
return null;
1414
}
1515

16-
const sevenDayBounceRate = status.sevenDay.bounceRate.toFixed(2);
17-
const sevenDayComplaintRate = status.sevenDay.complaintRate.toFixed(3);
18-
1916
return (
2017
<Alert variant="warning">
2118
<AlertTriangle className="h-4 w-4" />
2219
<AlertTitle>Security Warning - Action Required</AlertTitle>
23-
<AlertDescription className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
24-
<div className="space-y-1">
25-
<p className="text-sm">
26-
Your project has exceeded security thresholds. Current rates: 7-day bounce rate{' '}
27-
<strong>{sevenDayBounceRate}%</strong>, 7-day complaint rate{' '}
28-
<strong>{sevenDayComplaintRate}%</strong>.
20+
<AlertDescription className="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3">
21+
<div className="space-y-2 flex-1">
22+
<p className="text-sm font-medium">
23+
Your project has exceeded the following security thresholds:
2924
</p>
30-
<p className="text-xs text-amber-800">
25+
<ul className="list-disc list-inside space-y-1 text-sm text-amber-800">
26+
{status.warnings.map((warning, idx) => (
27+
<li key={idx}>{warning}</li>
28+
))}
29+
</ul>
30+
<p className="text-xs text-amber-800 mt-2">
3131
High bounce or complaint rates can lead to project suspension. Review the detailed metrics
3232
and take action to improve your email quality.
3333
</p>
3434
</div>
3535
<Link href="/settings?tab=security">
36-
<Button size="sm" variant="outline" className="w-full sm:w-auto">
36+
<Button size="sm" variant="outline" className="w-full sm:w-auto flex-shrink-0">
3737
View Details
3838
</Button>
3939
</Link>

0 commit comments

Comments
 (0)