aboutsummaryrefslogtreecommitdiff
path: root/modern/src/SocketController.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/SocketController.js')
-rw-r--r--modern/src/SocketController.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js
index cf01ff7f..9826d4b1 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -49,6 +49,8 @@ const SocketController = () => {
const response = await fetch('/api/server');
if (response.ok) {
dispatch(sessionActions.updateServer(await response.json()));
+ } else {
+ throw Error(await response.text());
}
}, []);
@@ -57,6 +59,8 @@ const SocketController = () => {
const response = await fetch('/api/devices');
if (response.ok) {
dispatch(devicesActions.refresh(await response.json()));
+ } else {
+ throw Error(await response.text());
}
connectSocket();
return () => {
@@ -88,10 +92,6 @@ const SocketController = () => {
{notifications.map((notification) => (
<Snackbar
key={notification.id}
- anchorOrigin={{
- vertical: 'bottom',
- horizontal: 'right',
- }}
open={notification.show}
message={notification.message}
autoHideDuration={snackBarDurationLongMs}