mirror of
https://github.com/catdevnull/transicion-desordenada-diablo
synced 2024-11-29 20:46:19 +00:00
arreglar types en frontend
This commit is contained in:
parent
e1d208b63c
commit
c26cc2d263
3 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
import streamSaver from "streamsaver";
|
||||
import { zData, type Distribution, zError, zDumpMetadata } from "common/schema";
|
||||
import { zData, type Distribution, zDumpError, zDumpMetadata } from "common/schema";
|
||||
|
||||
export async function downloadFile(
|
||||
dataPath: string,
|
||||
|
@ -73,6 +73,6 @@ export async function fetchErrors(url: string) {
|
|||
.split("\n")
|
||||
.filter((line) => !!line)
|
||||
.map((line) => JSON.parse(line))
|
||||
.map((json) => zError.parse(json));
|
||||
.map((json) => zDumpError.parse(json));
|
||||
return lines;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
$: data = Promise.all([fetchData(url), fetchErrors(url)])
|
||||
.then(([data, errors]) => ({ data, errors }))
|
||||
.catch(alert);
|
||||
</script>
|
||||
|
||||
<main class="mx-auto max-w-3xl">
|
||||
|
@ -102,6 +101,8 @@
|
|||
{/each}
|
||||
</ul>
|
||||
{/if}
|
||||
{:catch error}
|
||||
Hubo un error intenando cargar este dataset archivado. <pre>{error}</pre>
|
||||
{/await}
|
||||
</Container>
|
||||
</main>
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
$: data = Promise.all([fetchData(url), fetchErrors(url)])
|
||||
.then(([data, errors]) => ({ data, errors }))
|
||||
.catch(alert);
|
||||
|
||||
function arreglarHomepageUrl(url: string): string {
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
||||
|
|
Loading…
Reference in a new issue