Make SpeedtestComponent.jsx clickable

This commit is contained in:
Mathias Wagner
2024-08-03 15:31:55 +02:00
parent 3d182153db
commit 8b69ea5ff2

View File

@@ -10,7 +10,6 @@ import {deleteRequest} from "@/common/utils/RequestUtil";
import "./styles.sass";
import {averageResultDialog, resultDialog} from "@/pages/Home/components/Speedtest/utils/infos";
import {errors} from "@/pages/Home/components/Speedtest/utils/errors";
import {tooltips} from "@/pages/Home/components/Speedtest/utils/tooltips";
import {t} from "i18next";
import {ConfigContext} from "@/common/contexts/Config";
import {ToastNotificationContext} from "@/common/contexts/ToastNotification";
@@ -64,14 +63,10 @@ function SpeedtestComponent(props) {
}
return (
<div className="speedtest" ref={ref}>
<div className="speedtest" ref={ref} onClick={props.error ? showErrorDialog : showInfoDialog}>
<div className="date">
<div className="tooltip-element">
<FontAwesomeIcon icon={props.error ? faInfo : faClockRotateLeft}
className={"container-icon help-icon icon-" + (props.error ? "error" : "blue")}
onClick={props.error ? showErrorDialog : showInfoDialog}/>
<span className="tooltip">{tooltips()[props.type]}</span>
</div>
<FontAwesomeIcon icon={props.error ? faInfo : faClockRotateLeft}
className={"container-icon icon-" + (props.error ? "error" : "blue")}/>
<h2 className="date-text">{(t("time." + (isAverage ? "on" : "at"))) + " " + timeString}</h2>
</div>
<div className="speedtest-row">