From e52434e36ce9a6a1280bd7e363fc8064700dd46e Mon Sep 17 00:00:00 2001 From: sergesoroka Date: Sun, 15 Sep 2024 12:31:53 +0300 Subject: [PATCH] Added error handeling and h5webParams if domain is absent --- components/Chart/Chart.jsx | 13 ++----------- components/h5web/h5web.jsx | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/components/Chart/Chart.jsx b/components/Chart/Chart.jsx index 1b49eea..197d9f5 100755 --- a/components/Chart/Chart.jsx +++ b/components/Chart/Chart.jsx @@ -1,7 +1,7 @@ /* eslint-disable react/prop-types */ import * as Plot from "@observablehq/plot"; import { useEffect, useRef, useState } from "react"; -import { Link, useNavigate } from "react-router-dom"; +import { useNavigate } from "react-router-dom"; import useSWR from "swr"; export default function Chart({ imageSelected, setDomain, isNexusFile }) { @@ -103,21 +103,12 @@ export default function Chart({ imageSelected, setDomain, isNexusFile }) { > {copied ? "Copied to clipboard" : "Share a link"} - {/* { - navigate(`?h5web=${imageSelected}`); - if(!isNexusFile) { - setDomain(data.domain); - } - }} - >Share */} +