import { Error, ErrorProps } from './Error'; import { useLayoutDrawerState, useLayoutMediaState } from './Provider'; import { useThemeConfig } from '@/components/Layout/ThemeProvider'; import { Box, Container, Toolbar } from '@mui/material'; import { useTheme } from '@mui/material/styles'; import { Loading } from 'ra-ui-materialui'; import { ErrorInfo, Suspense, useState } from 'react'; import { ErrorBoundary } from 'react-error-boundary'; type ILayoutContentProps = React.PropsWithChildren & { error?: React.ComponentType; }; function LayoutContent(props: ILayoutContentProps) { const { width } = useLayoutDrawerState(); const { horizontal } = useLayoutMediaState(); const { container, themeOrientation } = useThemeConfig(); const [errorInfo, setErrorInfo] = useState(null); function handleError(_: Error, info: ErrorInfo) { setErrorInfo(info); } const theme = useTheme(); return ( ( )} > }> {/*Hugh...*/} {props.children} ); } export { LayoutContent };