diff --git a/src/components/WebsocketConnectError.js b/src/components/WebsocketConnectError.js deleted file mode 100644 index d824d86..0000000 --- a/src/components/WebsocketConnectError.js +++ /dev/null @@ -1,9 +0,0 @@ -import {Alert} from "@mui/material"; - -export default function WebsocketConnectError() { - return ( - - Failed to connect websocket. - - ); -} \ No newline at end of file diff --git a/src/components/notifications/StatisticsDataEnds.js b/src/components/notifications/StatisticsDataEnds.js new file mode 100644 index 0000000..0c37bbf --- /dev/null +++ b/src/components/notifications/StatisticsDataEnds.js @@ -0,0 +1,22 @@ +import {Button} from "@mui/material"; +import {enqueueSnackbar} from "notistack"; + +export default function StatisticsDataEnds() { + const action = ( + + ); + + return enqueueSnackbar('The statistics data stream is ended.', { + variant: 'warning', + persist: true, + action + }); +} \ No newline at end of file diff --git a/src/components/notifications/WebsocketConnectError.js b/src/components/notifications/WebsocketConnectError.js new file mode 100644 index 0000000..aa386ea --- /dev/null +++ b/src/components/notifications/WebsocketConnectError.js @@ -0,0 +1,21 @@ +import {Button} from "@mui/material"; +import {enqueueSnackbar} from "notistack"; + +export default function WebsocketConnectError() { + const action = ( + + ); + + return enqueueSnackbar('Cannot connect to WebSocket.', { + variant: 'error', + persist: true, + action + }); +} \ No newline at end of file diff --git a/src/components/WebsocketDisconnectError.js b/src/components/notifications/WebsocketDisconnectError.js similarity index 84% rename from src/components/WebsocketDisconnectError.js rename to src/components/notifications/WebsocketDisconnectError.js index b7f0f45..7b80aa9 100644 --- a/src/components/WebsocketDisconnectError.js +++ b/src/components/notifications/WebsocketDisconnectError.js @@ -1,13 +1,11 @@ import {enqueueSnackbar} from "notistack"; import {Button} from "@mui/material"; -import RefreshIcon from '@mui/icons-material/Refresh'; export function showWebsocketDisconnectError() { const action = (