style: add comma to the Applied to target roles (#36067)

This commit is contained in:
Mohammed Yasin Mulla authored and GitHub committed 2025-06-02 12:48:20 -04:00
1 parent 14fd307392
commit 3c06705a13
1 file changed
+4 -4
@@ -78,10 +78,10 @@ const PolicyRow = ({
<div className="text-foreground-lighter text-sm">
Applied to:{' '}
{policy.roles.slice(0, 3).map((role, i) => (
<code key={`policy-${role}-${i}`} className="text-foreground-light text-xs">
{role}
{policy.roles.length > 1 ? '' : ' '}
</code>
<span key={`policy-${role}-${i}`}>
<code className="text-foreground-light text-xs">{role}</code>
{i < Math.min(policy.roles.length, 3) - 1 && ', '}
</span>
))}
{policy.roles.length > 1 ? 'roles' : 'role'}
</div>