Cargando dataset...
@@ -27,7 +30,10 @@-
{#each metadata.sites as site}
{@const portalLink = inject(routes.Portal, {
- portalUrl: encodeURIComponent(`${url}/${site.path}`),
+ dumpUrl: params.dumpUrl,
+ portal: site.path,
})}
-
diff --git a/frontend/src/lib/routes/Portal.svelte b/frontend/src/lib/routes/Portal.svelte index 4578fc0..8a558b0 100644 --- a/frontend/src/lib/routes/Portal.svelte +++ b/frontend/src/lib/routes/Portal.svelte @@ -5,11 +5,12 @@ import { fetchData, fetchErrors } from "../fetch"; import { routes } from "../router"; import type { Dataset } from "common/schema"; + import Nav from "../nav/Nav.svelte"; - export let params: { portalUrl: string }; - const url = decodeURIComponent(params.portalUrl); + export let params: { dumpUrl: string; portal: string }; + $: url = `${decodeURIComponent(params.dumpUrl)}/${params.portal}`; - const data = Promise.all([fetchData(url), fetchErrors(url)]).then( + $: data = Promise.all([fetchData(url), fetchErrors(url)]).then( ([data, errors]) => ({ data, errors }), ); @@ -29,6 +30,8 @@
+ + {#await data}Cargando..
@@ -70,7 +73,8 @@-
{#each filterDatasets(data.dataset, query) as dataset}
{@const datasetLink = inject(routes.Dataset, {
- portalUrl: params.portalUrl,
+ dumpUrl: params.dumpUrl,
+ portal: params.portal,
id: dataset.identifier,
})}