Skip to content

Commit

Permalink
Fix small issues with PingTable
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraLS3 committed Oct 21, 2023
1 parent edf8615 commit 53b1dc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import {Card} from "react-bootstrap";
import CardHeader from "../CardHeader";
import {faWifi} from "@fortawesome/free-solid-svg-icons";
import PingTable from "../../table/PingTable";
import {ChartLoader} from "../../navigation/Loader";

const PingTableCard = ({data}) => {
return (
<Card id={'ping-per-country'}>
<CardHeader icon={faWifi} color="green" label={'html.label.connectionInfo'}/>
<PingTable countries={data?.table || []}/>
{data && <PingTable countries={data?.table || []}/>}
{!data && <ChartLoader/>}
</Card>
)
};
Expand Down
2 changes: 1 addition & 1 deletion Plan/react/dashboard/src/components/table/PingTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const PingTable = ({countries}) => {
</tr>
</thead>
<tbody>
{countries.length ? countries.map((country, i) => <PingRow key={i} country={country}/>) : <tr>
{countries.length ? countries.map(country => <PingRow key={country?.country} country={country}/>) : <tr>
<td>{t('generic.noData')}</td>
<td>-</td>
<td>-</td>
Expand Down

0 comments on commit 53b1dc4

Please sign in to comment.