mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
remove Loading... message
This commit is contained in:
@@ -1,20 +1,15 @@
|
|||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||||
import { Box, Button, CircularProgress, Typography } from '@mui/material';
|
import { Box, Button, CircularProgress } from '@mui/material';
|
||||||
|
|
||||||
import { MessageBox } from 'components';
|
import { MessageBox } from 'components';
|
||||||
import { useI18nContext } from 'i18n/i18n-react';
|
import { useI18nContext } from 'i18n/i18n-react';
|
||||||
|
|
||||||
interface FormLoaderProps {
|
interface FormLoaderProps {
|
||||||
message?: string;
|
|
||||||
errorMessage?: string;
|
errorMessage?: string;
|
||||||
onRetry?: () => void;
|
onRetry?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const FormLoader = ({
|
const FormLoader = ({ errorMessage, onRetry }: FormLoaderProps) => {
|
||||||
errorMessage,
|
|
||||||
onRetry,
|
|
||||||
message = 'Loading…'
|
|
||||||
}: FormLoaderProps) => {
|
|
||||||
const { LL } = useI18nContext();
|
const { LL } = useI18nContext();
|
||||||
|
|
||||||
if (errorMessage) {
|
if (errorMessage) {
|
||||||
@@ -38,9 +33,6 @@ const FormLoader = ({
|
|||||||
<Box py={2}>
|
<Box py={2}>
|
||||||
<CircularProgress size={100} />
|
<CircularProgress size={100} />
|
||||||
</Box>
|
</Box>
|
||||||
<Typography variant="h6" fontWeight={400} textAlign="center">
|
|
||||||
{message}
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ const LoadingSpinner = ({ height = '100%' }: LoadingSpinnerProps) => {
|
|||||||
})}
|
})}
|
||||||
size={100}
|
size={100}
|
||||||
/>
|
/>
|
||||||
<Typography variant="h4" color="textSecondary">
|
|
||||||
{LL.LOADING()}…
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user