applying linter fixes to viewer /app [#49] (#344)

Add biome linter and configuration to /app viewer.
This commit is contained in:
Brandon Liu
2024-02-01 15:59:34 +08:00
committed by GitHub
parent 61ed024d21
commit 7cc025c776
10 changed files with 328 additions and 148 deletions

View File

@@ -1,8 +1,7 @@
import { useState, Dispatch, SetStateAction, useCallback } from "react";
import maplibregl from "maplibre-gl";
import { PMTiles, FileSource } from "../../js/index";
import { styled } from "./stitches.config";
import { Dispatch, SetStateAction, useCallback, useState } from "react";
import { useDropzone } from "react-dropzone";
import { FileSource, PMTiles } from "../../js/index";
import { styled } from "./stitches.config";
import * as LabelPrimitive from "@radix-ui/react-label";
@@ -13,7 +12,7 @@ const Input = styled("input", {
justifyContent: "center",
fontSize: "$3",
fontFamily: "$sans",
"&:focus": { boxShadow: `0 0 0 1px black` },
"&:focus": { boxShadow: "0 0 0 1px black" },
width: "100%",
border: "1px solid $white",
padding: "$1",
@@ -115,8 +114,8 @@ function Start(props: {
onDrop,
});
let [remoteUrl, setRemoteUrl] = useState<string>("");
let [selectedExample, setSelectedExample] = useState<number | null>(1);
const [remoteUrl, setRemoteUrl] = useState<string>("");
const [selectedExample, setSelectedExample] = useState<number | null>(1);
const onRemoteUrlChangeHandler = (
event: React.ChangeEvent<HTMLInputElement>
@@ -142,7 +141,7 @@ function Start(props: {
id="remoteUrl"
placeholder="https://example.com/my_archive.pmtiles"
onChange={onRemoteUrlChangeHandler}
></Input>
/>
<Button color="gray" onClick={onSubmit} disabled={!remoteUrl.trim()}>
Load URL
</Button>