inspector app has shared tile type detection

This commit is contained in:
Brandon Liu
2022-05-05 11:22:35 +08:00
parent ade6b7508e
commit e926399853
6 changed files with 129 additions and 47 deletions

View File

@@ -2,15 +2,13 @@ import { useState, useEffect } from "react";
import { styled, globalStyles } from "./stitches.config";
import Start from "./Start";
import Inspector from "./Inspector";
import LeafletMap from "./LeafletMap";
import MaplibreMap from "./MaplibreMap";
import Loader from "./Loader";
const Header = styled("div", {
height: "$4",
});
const GIT_SHA = import.meta.env.VITE_GIT_SHA.substr(0,8)
const GIT_SHA = (import.meta.env.VITE_GIT_SHA || "").substr(0,8)
function App() {
globalStyles();
@@ -30,7 +28,7 @@ function App() {
return (
<div>
<Header>pmtiles viewer | github | toggle | {GIT_SHA}</Header>
{file ? <MaplibreMap file={file} /> : <Start setFile={setFile} />}
{file ? <Loader file={file} /> : <Start setFile={setFile} />}
</div>
);
}