19 lines
432 B
JavaScript
19 lines
432 B
JavaScript
import { CircularProgress } from "@mui/material";
|
|
import React from "react";
|
|
|
|
function LoadingComponent({ children, loading }) {
|
|
return (
|
|
<div className="relative">
|
|
{loading ? (
|
|
<div className="absolute min-h-[80px] mt-[160px] w-full h-full flex items-center justify-center">
|
|
<CircularProgress />
|
|
</div>
|
|
) : (
|
|
children
|
|
)}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default LoadingComponent;
|