Skip to content

Commit 405345c

Browse files
committed
Updated SGP facet with link
1 parent 60c5ab1 commit 405345c

File tree

1 file changed

+10
-3
lines changed
  • packages/column-views/src/facets/measurements

1 file changed

+10
-3
lines changed

packages/column-views/src/facets/measurements/sgp.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,23 @@ export function SGPMeasurementsColumn({ columnID }) {
4646
});
4747
}
4848

49-
function SGPSamplesNote(props: { note: any; focused: boolean }) {
50-
const { note, focused } = props;
49+
function SGPSamplesNote(props: {
50+
note: any;
51+
focused: boolean;
52+
sgpBaseURL?: string;
53+
}) {
54+
const { note, focused, sgpBaseURL = "https://sgp-search.io" } = props;
5155
const sgp_samples = note?.data;
5256

5357
if (sgp_samples == null || sgp_samples.length === 0) return null;
5458

5559
return h(TruncatedList, {
5660
className: "sgp-samples",
5761
data: sgp_samples,
58-
itemRenderer: (p) => h("span", p.data.name),
62+
itemRenderer: (p) => {
63+
const sgpLink = sgpBaseURL + `/samples/${p.data.id}`;
64+
return h("a", { href: sgpLink, target: "_blank" }, p.data.name);
65+
},
5966
maxItems: focused ? Infinity : 5,
6067
});
6168
}

0 commit comments

Comments
 (0)