Added a message in thr TestAreaComponent.jsx if no tests exists

This commit is contained in:
Mathias Wagner
2022-08-29 20:23:35 +02:00
parent 5629e5ffe1
commit 0cbe7611a0

View File

@@ -3,6 +3,7 @@ import {ConfigContext} from "@/common/contexts/Config";
import {SpeedtestContext} from "@/common/contexts/Speedtests";
import Speedtest from "../Speedtest";
import {getIconBySpeed} from "@/common/utils/TestUtil";
import "./styles.sass";
function TestArea() {
const config = useContext(ConfigContext)[0];
@@ -10,6 +11,8 @@ function TestArea() {
if (Object.entries(config).length === 0) return (<></>);
if (speedtests.length === 0) return <h2 className="error-text">Es liegen aktuell keine Tests vor</h2>
return (
<div className="speedtest-area">
{speedtests.map ? speedtests.map(test => {