From 064a062dad04de73cb9346cb1a4188e1cf4fc79d Mon Sep 17 00:00:00 2001 From: William Moore Date: Thu, 9 Feb 2023 16:25:39 +0000 Subject: [PATCH] Move URLs to /public/zarr_samples.json file --- public/zarr_samples.json | 8 ++++++++ src/App.jsx | 9 +++------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 public/zarr_samples.json diff --git a/public/zarr_samples.json b/public/zarr_samples.json new file mode 100644 index 0000000..9736f1d --- /dev/null +++ b/public/zarr_samples.json @@ -0,0 +1,8 @@ +{ + "urls": [ + "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0048A/9846152.zarr/", + "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/9836842.zarr", + "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.2/6001240.zarr", + "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.1/4495402.zarr" + ] +} diff --git a/src/App.jsx b/src/App.jsx index 338f479..bf70695 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,14 +3,11 @@ import React from "react"; import ImageItem from "./ImageItem"; +import zarr_samples_json from "../public/zarr_samples.json"; + // DeckGL react component export default function App() { - let sources = [ - "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0048A/9846152.zarr/", - "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/9836842.zarr", - "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.2/6001240.zarr", - "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.1/4495402.zarr" - ] + let sources = zarr_samples_json.urls; let items = sources.map((source) => );