Skip to content

Commit

Permalink
the h5web component in new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesoroka committed Sep 10, 2024
1 parent 5c825d9 commit a3d99a2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions components/Chart/Chart.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/prop-types */
import * as Plot from "@observablehq/plot";
import { useEffect, useRef, useState } from "react";
import { useNavigate } from "react-router-dom";
import { Link, useNavigate } from "react-router-dom";
import useSWR from "swr";

export default function Chart({ imageSelected, setDomain, isNexusFile }) {
Expand Down Expand Up @@ -103,11 +103,22 @@ export default function Chart({ imageSelected, setDomain, isNexusFile }) {
>
{copied ? "Copied to clipboard" : "Share a link"}
</button>
{/* <Link target="_blank" rel="noopener noreferrer"
onClick={() => {
navigate(`?h5web=${imageSelected}`);
if(!isNexusFile) {
setDomain(data.domain);
}
}}
>Share</Link> */}
<button
className="shareBtn"
target="_blank" rel="noopener noreferrer"
style={{ marginLeft: "16px" }}
onClick={() => {
navigate(`?h5web=${imageSelected}`);
// navigate(`?h5web=${imageSelected}`);
window.open(`?h5web=${imageSelected}`, "_blank")
if(!isNexusFile) {
setDomain(data.domain);
}
Expand Down

0 comments on commit a3d99a2

Please sign in to comment.