mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-10-31 16:01:00 +01:00
Fix small issues with PingTable
This commit is contained in:
parent
edf86155d1
commit
53b1dc4e35
@ -3,12 +3,14 @@ import {Card} from "react-bootstrap";
|
|||||||
import CardHeader from "../CardHeader";
|
import CardHeader from "../CardHeader";
|
||||||
import {faWifi} from "@fortawesome/free-solid-svg-icons";
|
import {faWifi} from "@fortawesome/free-solid-svg-icons";
|
||||||
import PingTable from "../../table/PingTable";
|
import PingTable from "../../table/PingTable";
|
||||||
|
import {ChartLoader} from "../../navigation/Loader";
|
||||||
|
|
||||||
const PingTableCard = ({data}) => {
|
const PingTableCard = ({data}) => {
|
||||||
return (
|
return (
|
||||||
<Card id={'ping-per-country'}>
|
<Card id={'ping-per-country'}>
|
||||||
<CardHeader icon={faWifi} color="green" label={'html.label.connectionInfo'}/>
|
<CardHeader icon={faWifi} color="green" label={'html.label.connectionInfo'}/>
|
||||||
<PingTable countries={data?.table || []}/>
|
{data && <PingTable countries={data?.table || []}/>}
|
||||||
|
{!data && <ChartLoader/>}
|
||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ const PingTable = ({countries}) => {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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>{t('generic.noData')}</td>
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user