Moved map asset loading progress to use refs to stop re-renders
Moved map loading overlay to use animation frames for a smooth progress bar
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React from "react";
|
||||
import { Box, Progress } from "theme-ui";
|
||||
import { Box } from "theme-ui";
|
||||
|
||||
import Spinner from "./Spinner";
|
||||
|
||||
function LoadingOverlay({ progress }) {
|
||||
function LoadingOverlay() {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
@@ -20,9 +20,6 @@ function LoadingOverlay({ progress }) {
|
||||
bg="muted"
|
||||
>
|
||||
<Spinner />
|
||||
{progress && (
|
||||
<Progress max={1} value={progress} m={2} sx={{ width: "24px" }} />
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user