From b49bbbc8bbc75732933b7929e3c736c852c73572 Mon Sep 17 00:00:00 2001 From: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:04:00 +0100 Subject: [PATCH] fix with-imported-switch for safari (#4194) --- .../stats/graph/with-imported-switch.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/assets/js/dashboard/stats/graph/with-imported-switch.js b/assets/js/dashboard/stats/graph/with-imported-switch.js index 8f99eb2bf..9e9264643 100644 --- a/assets/js/dashboard/stats/graph/with-imported-switch.js +++ b/assets/js/dashboard/stats/graph/with-imported-switch.js @@ -4,24 +4,30 @@ import * as url from '../../util/url' import { BarsArrowUpIcon } from '@heroicons/react/20/solid' import classNames from "classnames" +function LinkOrDiv({isLink, target, children}) { + if (isLink) { + return { children } + } else { + return
{ children }
+ } +} + export default function WithImportedSwitch({query, info}) { if (info && info.visible) { const {togglable, tooltip_msg} = info const enabled = togglable && query.with_imported const target = url.setQuery('with_imported', (!enabled).toString()) - const linkClass = classNames({ + const iconClass = classNames("mt-0.5", { "dark:text-gray-300 text-gray-700": enabled, "dark:text-gray-500 text-gray-400": !enabled, - "cursor-pointer": togglable, - "pointer-events-none": !togglable, }) return (
- - - + + +
) } else {