mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
* 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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user