Skip to content

Commit

Permalink
client: add titles with service names to the clients table
Browse files Browse the repository at this point in the history
  • Loading branch information
IldarKamalov committed Oct 27, 2022
1 parent 79ed315 commit 511797c
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
splitByNewLine,
countClientsStatistics,
sortIp,
getServiceIcon,
getService,
} from '../../../../helpers/helpers';
import { MODAL_TYPE } from '../../../../helpers/constants';
import Card from '../../../ui/Card';
Expand Down Expand Up @@ -179,16 +179,20 @@ const ClientsTable = ({
return (
<div className="logs__row logs__row--icons">
{value.map((service) => {
const icon = getServiceIcon(services.allServices, service);
const serviceInfo = getService(services.allServices, service);

if (icon) {
if (serviceInfo?.icon_svg) {
return (
<div
dangerouslySetInnerHTML={{ __html: window.atob(icon) }}
key={serviceInfo.name}
dangerouslySetInnerHTML={{ __html: window.atob(serviceInfo.icon_svg) }}
className="service__icon service__icon--table"
title={serviceInfo.name}
/>
);
}

return null;
})}
</div>
);
Expand Down

0 comments on commit 511797c

Please sign in to comment.