import { Backdrop, CircularProgress, useTheme } from "@mui/material"; import { createContext, useState } from "react"; type Props = { children: React.ReactNode; }; type ContextProps = { showBackDrop: boolean; setShowBackDrop: (show: boolean) => void; }; const defaultProps: ContextProps = { showBackDrop: false, setShowBackDrop: (show: boolean) => {}, }; export const BackDroptContext = createContext(defaultProps); export default function BackDropContextProvider({ children }: Props) { const [showBackDrop, setShowBackDrop] = useState(false); return ( {children} ); }