Skip to content

Commit

Permalink
fix: Adds correct external link for Omnibus Broad.
Browse files Browse the repository at this point in the history
The FlyLight Split-GAL4 Omnibus Broad website is not the same as the
split-GAL4 website, so the links needed to be modified when displaying
this dataset.
  • Loading branch information
neomorphic committed Oct 29, 2024
1 parent 3924b9b commit fe0812c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/ExternalLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

const lmUrl =
"http://splitgal4.janelia.org/cgi-bin/view_splitgal4_imagery.cgi?slidecode=<NAME>";
const lmrawUrl =
"https://flylight-raw.janelia.org/cgi-bin/view_raw_imagery.cgi?slidecode=<NAME>"
const mcfoUrl =
"http://gen1mcfo.janelia.org/cgi-bin/view_gen1mcfo_imagery.cgi?slidecode=<NAME>";
// https://neuprint.janelia.org/view?dataset=hemibrain:v1.1&bodyid=12345678
Expand Down Expand Up @@ -54,6 +56,9 @@ export default function ExternalLink({ id, isLM, library, publishedName }) {
if (library.match(/gen1.*mcfo/i)) {
extUrl = mcfoUrl;
extName = "FlyLight Gen1 MCFO";
} else if (library.match(/Omnibus Broad/i)) {
extUrl = lmrawUrl;
extName = "FlyLight Raw Collection";
}

return (
Expand Down
6 changes: 6 additions & 0 deletions src/components/__tests__/ExternalLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ describe("ExternalLink: unit tests", () => {
"http://splitgal4.janelia.org/cgi-bin/view_splitgal4_imagery.cgi?slidecode=foo"
);

rerender(<ExternalLink id="foo" library="FlyLight Split-GAL4 Omnibus Broad" />);
expect(getByText("FlyLight Raw Collection")).toHaveAttribute(
"href",
"https://flylight-raw.janelia.org/cgi-bin/view_raw_imagery.cgi?slidecode=foo"
);

rerender(<ExternalLink id="foo" library="FlyLight Split-GAL4" />);
expect(getByText("FlyLight Split-GAL4")).toHaveAttribute(
"href",
Expand Down

0 comments on commit fe0812c

Please sign in to comment.