From f2bc0b504997b217ce570f6353995231c551c635 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sun, 1 Feb 2026 18:44:25 +0000 Subject: [PATCH] WIP --- .../src/features/page-history/hooks/use-history-reset.ts | 2 +- .../src/features/page-history/hooks/use-history-restore.tsx | 4 ---- .../src/features/page-history/queries/page-history-query.ts | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/client/src/features/page-history/hooks/use-history-reset.ts b/apps/client/src/features/page-history/hooks/use-history-reset.ts index c9ff503c..15ae0587 100644 --- a/apps/client/src/features/page-history/hooks/use-history-reset.ts +++ b/apps/client/src/features/page-history/hooks/use-history-reset.ts @@ -18,7 +18,7 @@ export function useHistoryReset(pageId: string) { useEffect(() => { setActiveHistoryId(""); setActiveHistoryPrevId(""); - // @ts-ignore - null is valid to clear the counts + // @ts-ignore setDiffCounts(null); }, [pageId, setActiveHistoryId, setActiveHistoryPrevId, setDiffCounts]); } diff --git a/apps/client/src/features/page-history/hooks/use-history-restore.tsx b/apps/client/src/features/page-history/hooks/use-history-restore.tsx index 808ed9db..fbeb4e6e 100644 --- a/apps/client/src/features/page-history/hooks/use-history-restore.tsx +++ b/apps/client/src/features/page-history/hooks/use-history-restore.tsx @@ -21,10 +21,6 @@ import { SpaceCaslSubject, } from "@/features/space/permissions/permissions.type"; -/** - * Manages history restore functionality including permission checking, - * confirmation modal, and the actual restore operation. - */ export function useHistoryRestore() { const { t } = useTranslation(); diff --git a/apps/client/src/features/page-history/queries/page-history-query.ts b/apps/client/src/features/page-history/queries/page-history-query.ts index 43590232..0fbfc6c9 100644 --- a/apps/client/src/features/page-history/queries/page-history-query.ts +++ b/apps/client/src/features/page-history/queries/page-history-query.ts @@ -13,7 +13,7 @@ import { IPageHistory } from "@/features/page-history/types/page.types"; import { IPagination } from "@/lib/types.ts"; import { queryClient } from "@/main"; -const HISTORY_STALE_TIME = 10 * 60 * 1000; +const HISTORY_STALE_TIME = 60 * 60 * 1000; export function prefetchPageHistory(historyId: string) { return queryClient.prefetchQuery({