|  |  | 
 |  |  |     Pagination, | 
 |  |  |     ListToolbar, | 
 |  |  | } from 'react-admin'; | 
 |  |  | import { Box, Typography, Card, Stack } from '@mui/material'; | 
 |  |  | import { Box, Typography, LinearProgress, Stack } from '@mui/material'; | 
 |  |  | import { styled } from '@mui/material/styles'; | 
 |  |  | import AgvCreate from "./AgvCreate"; | 
 |  |  | import AgvPanel from "./AgvPanel"; | 
 |  |  | 
 |  |  | import MyExportButton from '../components/MyExportButton'; | 
 |  |  | import PageDrawer from "../components/PageDrawer"; | 
 |  |  | import MyField from "../components/MyField"; | 
 |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; | 
 |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE, CUSTOM_PAGES_DATA_INTERVAL } from '@/config/setting'; | 
 |  |  | import * as Common from '@/utils/common'; | 
 |  |  | import { ImageList } from "./GridList"; | 
 |  |  | import { AgvListFilter } from "./AgvListFilter"; | 
 |  |  | 
 |  |  | } | 
 |  |  |  | 
 |  |  | const AgvGridLayout = ({ setCreateDialog }) => { | 
 |  |  |     const refresh = useRefresh(); | 
 |  |  |     const { data, isPending, filterValues } = useListContext(); | 
 |  |  |     const { data, isPending, filterValues, refetch } = useListContext(); | 
 |  |  |     const hasFilters = filterValues && Object.keys(filterValues).length > 0; | 
 |  |  |  | 
 |  |  |     React.useEffect(() => { | 
 |  |  |         const intervalId = setInterval(() => { | 
 |  |  |             refresh(); | 
 |  |  |         }, 2000); | 
 |  |  |         return () => clearInterval(intervalId); | 
 |  |  |     }, [refresh]); | 
 |  |  |             refetch(); | 
 |  |  |         }, CUSTOM_PAGES_DATA_INTERVAL); | 
 |  |  |  | 
 |  |  |     if (isPending) return null; | 
 |  |  |         return () => clearInterval(intervalId); | 
 |  |  |     }, [refetch]); | 
 |  |  |  | 
 |  |  |     if (isPending) return <LinearProgress />; | 
 |  |  |     if (!data?.length && !hasFilters) return <EmptyData onClick={() => { setCreateDialog(true) }} />; | 
 |  |  |  | 
 |  |  |     return ( |