Skip to content

Commit f29e984

Browse files
atrakhConvex, Inc.
authored and
Convex, Inc.
committed
remove toast for unexpected loading state (#37285)
GitOrigin-RevId: 32a69e6f94d371dc2a9375c4183972f37a167ede
1 parent 2cb781e commit f29e984

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

npm-packages/dashboard-common/src/features/data/components/DataContent.tsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ import {
5252
import { cn } from "@ui/cn";
5353
import { useTableIndexes } from "@common/features/data/lib/api";
5454
import { getDefaultIndex } from "@common/features/data/components/DataFilters/IndexFilters";
55-
import { toast } from "@common/lib/utils";
5655
import { useMount } from "react-use";
5756

5857
export function DataContent({
@@ -427,22 +426,11 @@ function UnexpectedLoadingState({
427426
}) {
428427
const { captureMessage } = useContext(DeploymentInfoContext);
429428

430-
useEffect(() => {
431-
const timeout = setTimeout(() => {
432-
toast(
433-
"error",
434-
"Encountered an unexpected state while loading data, please try refreshing the page if the issue persists.",
435-
"unexpected-loading-state",
436-
);
437-
}, 5000);
438-
439-
return () => clearTimeout(timeout);
440-
}, [status, numRowsInTable, numRowsRead, isLoading, captureMessage]);
441-
442429
useMount(() => {
443-
captureMessage(
444-
`Encountered unexpected state in data page: status: ${status}, numRowsInTable: ${numRowsInTable}, numRowsRead: ${numRowsRead}, isLoading: ${isLoading}`,
445-
);
430+
!isLoading &&
431+
captureMessage(
432+
`Encountered unexpected state in data page: status: ${status}, numRowsInTable: ${numRowsInTable}, numRowsRead: ${numRowsRead}, isLoading: ${isLoading}`,
433+
);
446434
});
447435

448436
return null;

0 commit comments

Comments
 (0)