From 6e84525a6ad1a3aa776b4ea56c69349b6e5af356 Mon Sep 17 00:00:00 2001 From: Jody Clements Date: Mon, 15 Jun 2026 09:35:46 -0400 Subject: [PATCH] fix: include dataset in all flywire links Consolidate the FAFB and BANC FlyWire URL templates into a single template with a placeholder, and default the FlyWireLink dataset prop to "fafb" so the FAFB links also carry an explicit dataset query parameter. --- src/components/ExternalLink.jsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/ExternalLink.jsx b/src/components/ExternalLink.jsx index 30cefa0..cc0fbac 100644 --- a/src/components/ExternalLink.jsx +++ b/src/components/ExternalLink.jsx @@ -11,10 +11,8 @@ const mcfoUrl = "http://gen1mcfo.janelia.org/cgi-bin/view_gen1mcfo_imagery.cgi?slidecode="; // https://neuprint.janelia.org/view?dataset=hemibrain:v1.1&bodyid=12345678 const vfbUrl = "http://virtualflybrain.org/xref/neuronbridge/"; - const flyWireUrl = - "https://codex.flywire.ai/app/cell_details?data_version=&root_id="; - const flyWireBancUrl = - "https://codex.flywire.ai/app/cell_details?dataset=banc&data_version=&root_id="; +const flyWireUrl = + "https://codex.flywire.ai/app/cell_details?dataset=&data_version=&root_id="; function VFBLink({ name }) { return ( @@ -31,13 +29,13 @@ VFBLink.propTypes = { function FlyWireLink({ tag, dataset }) { const [, version, id] = tag.split(":"); - const urlTemplate = dataset === "banc" ? flyWireBancUrl : flyWireUrl; return ( /, id) - .replace(//, version.replace(/^v/, ""))} + .replace(//, version.replace(/^v/, "")) + .replace(//, dataset)} target="_blank" rel="noopener noreferrer" > @@ -53,7 +51,7 @@ FlyWireLink.propTypes = { }; FlyWireLink.defaultProps = { - dataset: null, + dataset: "fafb", }; export default function ExternalLink({ id, isLM, library, publishedName }) {