linting and typing improvements [#287] (#337)

* Typing improvements [#287]

* rename FileApiSource to FileSource
* In a few cases we need to use any and biome-ignore. Deferring any restructuring here to js v4.
* replace prettier with biome
This commit is contained in:
Brandon Liu
2024-01-31 12:22:25 +08:00
committed by GitHub
parent 6bb1c68ead
commit 6638d040a5
8 changed files with 74 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
import { useState, Dispatch, SetStateAction, useCallback } from "react";
import maplibregl from "maplibre-gl";
import { PMTiles, FileAPISource } from "../../js/index";
import { PMTiles, FileSource } from "../../js/index";
import { styled } from "./stitches.config";
import { useDropzone } from "react-dropzone";
@@ -108,7 +108,7 @@ function Start(props: {
setFile: Dispatch<SetStateAction<PMTiles | undefined>>;
}) {
const onDrop = useCallback((acceptedFiles: File[]) => {
props.setFile(new PMTiles(new FileAPISource(acceptedFiles[0])));
props.setFile(new PMTiles(new FileSource(acceptedFiles[0])));
}, []);
const { acceptedFiles, getRootProps, getInputProps } = useDropzone({