Skip to content

Commit

Permalink
Update SVGloaders.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Oct 21, 2023
1 parent 40a6119 commit fae3252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/SVGloaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function SubsetHistogram({ id, filter, datasetIds, plotRegionLabels, plot
export function CallsetHistogram({ csid, datasetIds }) {
const componentRef = useRef()
const { width } = useContainerDimensions(componentRef)
const url = `${SITE_DEFAULTS.API_PATH}beacon/biosamples/?analysisIds=${csid}&datasetIds=${datasetIds}&output=samplesplot&plot_width=${width}`
const url = `${SITE_DEFAULTS.API_PATH}services/sampleplots?analysisIds=${csid}&datasetIds=${datasetIds}&plot_width=${width}`
// width > 0 to make sure the component is mounted and avoid double fetch
const dataEffect = useExtendedSWR(width > 0 && url, svgFetcher)
return (
Expand All @@ -87,7 +87,7 @@ export function CallsetHistogram({ csid, datasetIds }) {
export function BiosamplePlot({ biosid, datasetIds, plotRegionLabels, plotChros}) {
const componentRef = useRef()
const { width } = useContainerDimensions(componentRef)
const url = `${SITE_DEFAULTS.API_PATH}beacon/biosamples/${biosid}/?datasetIds=${datasetIds}&output=samplesplot&plot_width=${width}&plotRegionLabels=${plotRegionLabels}&plotChros=${plotChros}&forceEmptyPlot=true`
const url = `${SITE_DEFAULTS.API_PATH}services/sampleplots/${biosid}?datasetIds=${datasetIds}&plot_width=${width}&plotRegionLabels=${plotRegionLabels}&plotChros=${plotChros}&forceEmptyPlot=true`
// width > 0 to make sure the component is mounted and avoid double fetch
const dataEffect = useExtendedSWR(width > 0 && url, svgFetcher)
return (
Expand Down

0 comments on commit fae3252

Please sign in to comment.