mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-02-14 01:28:39 -06:00
Added a message in thr TestAreaComponent.jsx if no tests exists
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user