refactore: cleanup __root.tsx

This commit is contained in:
Prayag Prajapati committed 2024-12-03 18:13:36 +05:30
1 parent 561daa7d81
commit e049ce9ad6
10 files changed
+274 -256

No files matched your search

+24
View File
@@ -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>
);
}