fix(core): debounce doc update time update (#7363)

This commit is contained in:
pengx17
2024-06-27 10:37:43 +00:00
parent ae230354c6
commit 4f07a2cc2a

View File

@@ -48,6 +48,7 @@ import {
} from '@toeverything/infra';
import clsx from 'clsx';
import { use } from 'foxact/use';
import { useDebouncedValue } from 'foxact/use-debounced-value';
import { atom, useAtomValue, useSetAtom } from 'jotai';
import type React from 'react';
import type {
@@ -674,6 +675,8 @@ export const PagePropertiesTableHeader = ({
t,
]);
const dTimestampElement = useDebouncedValue(timestampElement, 500);
const handleCollapse = useCallback(() => {
onOpenChange(!open);
}, [onOpenChange, open]);
@@ -691,7 +694,7 @@ export const PagePropertiesTableHeader = ({
</div>
</PageBacklinksPopup>
) : null}
{timestampElement}
{dTimestampElement}
</div>
<Divider />
<div className={styles.tableHeaderSecondaryRow}>