|
|
@@ -11,6 +11,7 @@ import { mapExplorerError } from "@/lib/frontend/explorer/errorMapping";
|
|
|
import { buildLoginUrl, LOGIN_REASONS } from "@/lib/frontend/authRedirect";
|
|
|
import { useExplorerQuery } from "@/lib/frontend/hooks/useExplorerQuery";
|
|
|
import { useDebouncedVisibility } from "@/lib/frontend/hooks/useDebouncedVisibility";
|
|
|
+import { LOADING_UI_DELAY_MS } from "@/lib/frontend/ui/uxTimings";
|
|
|
|
|
|
import ExplorerBreadcrumbs from "@/components/explorer/breadcrumbs/ExplorerBreadcrumbs";
|
|
|
import ExplorerPageShell from "@/components/explorer/ExplorerPageShell";
|
|
|
@@ -23,8 +24,6 @@ import ExplorerNotFound from "@/components/explorer/states/ExplorerNotFound";
|
|
|
import ForbiddenView from "@/components/system/ForbiddenView";
|
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
|
|
-const LOADING_DELAY_MS = 300;
|
|
|
-
|
|
|
export default function YearsExplorer({ branch }) {
|
|
|
const loadFn = React.useCallback(() => getYears(branch), [branch]);
|
|
|
const { status, data, error, retry } = useExplorerQuery(loadFn, [loadFn]);
|
|
|
@@ -32,7 +31,7 @@ export default function YearsExplorer({ branch }) {
|
|
|
const mapped = React.useMemo(() => mapExplorerError(error), [error]);
|
|
|
|
|
|
const showLoadingUi = useDebouncedVisibility(status === "loading", {
|
|
|
- delayMs: LOADING_DELAY_MS,
|
|
|
+ delayMs: LOADING_UI_DELAY_MS,
|
|
|
minVisibleMs: 0,
|
|
|
});
|
|
|
|