refactore: cleanup __root.tsx
This commit is contained in:
10 files changed
+274
-256
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { CircularProgress } from "@mui/material";
|
||||
import { useRouterState } from "@tanstack/react-router";
|
||||
import React from "react";
|
||||
|
||||
export default function RouterLoading() {
|
||||
const routeLoading = useRouterState().isLoading;
|
||||
if (!routeLoading) return null;
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
width: "100vw",
|
||||
height: "100vh",
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
background: "rgb(0 0 0 / 0.35)",
|
||||
position: "fixed",
|
||||
zIndex: 10000,
|
||||
}}
|
||||
>
|
||||
<CircularProgress size={72} thickness={2} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user