diff --git a/package.json b/package.json
index 4fac66726..6285d9225 100644
--- a/package.json
+++ b/package.json
@@ -47,7 +47,6 @@
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.0",
"react-color-palette": "^6.2.0",
- "react-detect-offline": "^2.4.5",
"react-div-100vh": "^0.7.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
diff --git a/src/components/Table/EmptyTable.tsx b/src/components/Table/EmptyTable.tsx
index 2301f43eb..2fb06875e 100644
--- a/src/components/Table/EmptyTable.tsx
+++ b/src/components/Table/EmptyTable.tsx
@@ -1,5 +1,4 @@
import { useAtom, useSetAtom } from "jotai";
-import { Offline, Online } from "react-detect-offline";
import { Grid, Stack, Typography, Button, Divider } from "@mui/material";
import {
@@ -142,36 +141,34 @@ export default function EmptyTable() {
);
}
- return (
- <>
-
-
-
-
-
-
- {contents}
-
-
- >
- );
+ if (navigator.onLine) {
+ return (
+
+ {contents}
+
+ );
+ } else {
+ return (
+
+ );
+ }
}
diff --git a/src/components/TableToolbar/LoadedRowsStatus.tsx b/src/components/TableToolbar/LoadedRowsStatus.tsx
index 6a1465fa9..cf0499bec 100644
--- a/src/components/TableToolbar/LoadedRowsStatus.tsx
+++ b/src/components/TableToolbar/LoadedRowsStatus.tsx
@@ -1,6 +1,5 @@
import { Suspense, forwardRef } from "react";
import { useAtom } from "jotai";
-import { Offline, Online } from "react-detect-offline";
import { Tooltip, Typography, TypographyProps } from "@mui/material";
import SyncIcon from "@mui/icons-material/Sync";
@@ -78,22 +77,20 @@ function LoadedRowsStatus() {
}
export default function SuspendedLoadedRowsStatus() {
- return (
- <>
-
- {loadingIcon}Loading…}>
-
-
-
-
-
-
-
-
- Offline
-
-
-
- >
- );
+ if (navigator.onLine) {
+ return (
+ {loadingIcon}Loading…}>
+
+
+ );
+ } else {
+ return (
+
+
+
+ Offline
+
+
+ );
+ }
}
diff --git a/yarn.lock b/yarn.lock
index 2099ba0b9..def7b0f4f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10381,11 +10381,6 @@ react-color-palette@^6.2.0:
resolved "https://registry.yarnpkg.com/react-color-palette/-/react-color-palette-6.2.0.tgz#aa3be88f6953d57502c00f4433692129ffbad3e7"
integrity sha512-9rIboaRJNoeF8aCI2f3J8wgMyhl74SnGmZLDjor3bKf0iDBhP2EBv0/jGmm0hrj6OackGCqtWl5ZvM89XUc3sg==
-react-detect-offline@^2.4.5:
- version "2.4.5"
- resolved "https://registry.yarnpkg.com/react-detect-offline/-/react-detect-offline-2.4.5.tgz#3c242516c37b6789cf89102881031f87e70b80e6"
- integrity sha512-sI13NPEKl3uQp95FT5CwrYzH3DnXCwNP6TnY6NRF5gFDM4NU9KDlbtA6HG2dwhDVS0RYQGXwZW/mHbdf8fCnaw==
-
react-dev-utils@^12.0.1:
version "12.0.1"
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73"