feat(web): Add a global query fetch/mutation status

This commit is contained in:
Prayag Prajapati committed 2024-02-19 19:22:41 +05:30
1 parent 778c8f8039
commit 9d28aaae96
6 files changed
+185 -22

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
import { LinearProgress } from "@mui/material";
import { useNProgress } from "@tanem/react-nprogress";
import React from "react";
const NProgress: React.FC<{ isAnimating: boolean | number }> = ({
isAnimating,
}) => {
const { animationDuration, isFinished, progress } = useNProgress({
isAnimating,
});
return (
<div
style={{
opacity: isFinished ? 0 : 1,
pointerEvents: "none",
transition: `opacity ${animationDuration}ms linear`,
position: "fixed",
top: "0",
left: "0",
right: "0",
zIndex: "10000",
}}
>
<LinearProgress
sx={{
transitionDuration: animationDuration,
}}
value={progress * 100}
variant="determinate"
/>
</div>
);
};
export default NProgress;
-8
View File
@@ -10,14 +10,6 @@ const ItemSkeleton = () => {
width: "100vw",
}}
>
<LinearProgress
sx={{
position: "fixed",
top: "0",
left: 0,
right: 0,
}}
/>
<div
className="item-hero flex flex-row"
style={{