import { LinearProgress, Stack, Typography } from '@mui/material'; 
 | 
import { CreateButton, useGetList } from 'react-admin'; 
 | 
import useAppBarHeight from './useAppBarHeight'; 
 | 
import { matchPath, useLocation } from 'react-router'; 
 | 
import { Link } from 'react-router-dom'; 
 | 
  
 | 
const EmptyDataLoader = ({ children }) => { 
 | 
    const location = useLocation(); 
 | 
    const matchCreate = matchPath('/mission/create', location.pathname); 
 | 
    const appBarHeight = useAppBarHeight(); 
 | 
  
 | 
    return ( 
 | 
        <Stack 
 | 
            justifyContent="center" 
 | 
            alignItems="center" 
 | 
            gap={3} 
 | 
            sx={{ 
 | 
                height: `calc(100dvh - ${appBarHeight}px)`, 
 | 
            }} 
 | 
        > 
 | 
            <img src="/empty.svg" alt="No contacts found" /> 
 | 
            <Stack gap={0} alignItems="center"> 
 | 
                <Typography variant="h6" fontWeight="bold"> 
 | 
                    No data found 
 | 
                </Typography> 
 | 
                <Typography 
 | 
                    variant="body2" 
 | 
                    align="center" 
 | 
                    color="text.secondary" 
 | 
                    gutterBottom 
 | 
                > 
 | 
                    It seems your server data is empty. 
 | 
                    <br /> 
 | 
                    {children} 
 | 
                </Typography> 
 | 
            </Stack> 
 | 
        </Stack> 
 | 
    ); 
 | 
}; 
 | 
  
 | 
export default EmptyDataLoader; 
 |