mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-01-26 15:10:02 -06:00
Make SpeedtestComponent.jsx clickable
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user