mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
add lazy loading for components
This commit is contained in:
20
interface/src/components/loading/LazyLoader.tsx
Normal file
20
interface/src/components/loading/LazyLoader.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { Box, CircularProgress } from '@mui/material';
|
||||||
|
|
||||||
|
const LazyLoader = () => (
|
||||||
|
<Box
|
||||||
|
display="flex"
|
||||||
|
justifyContent="center"
|
||||||
|
alignItems="center"
|
||||||
|
minHeight="200px"
|
||||||
|
sx={{
|
||||||
|
backgroundColor: 'background.default',
|
||||||
|
borderRadius: 1,
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: 'divider'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress size={40} />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default LazyLoader;
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
export { default as LoadingSpinner } from './LoadingSpinner';
|
export { default as LoadingSpinner } from './LoadingSpinner';
|
||||||
export { default as FormLoader } from './FormLoader';
|
export { default as FormLoader } from './FormLoader';
|
||||||
|
export { default as LazyLoader } from './LazyLoader';
|
||||||
|
|||||||
Reference in New Issue
Block a user