refactor(toast): get rid of closeAfter in favor of delay

This commit is contained in:
Elian Doran
2025-12-07 00:04:12 +02:00
parent eb8f2021cb
commit da17a63ef5
6 changed files with 8 additions and 9 deletions

View File

@@ -725,7 +725,7 @@ export function useImperativeSearchHighlighlighting(highlightedTokens: string[]
export function useNoteTreeDrag(containerRef: MutableRef<HTMLElement | null | undefined>, { dragEnabled, dragNotEnabledMessage, callback }: {
dragEnabled: boolean,
dragNotEnabledMessage: Omit<ToastOptions, "id" | "closeAfter">;
dragNotEnabledMessage: Omit<ToastOptions, "id">;
callback: (data: DragData[], e: DragEvent) => void
}) {
useEffect(() => {
@@ -737,7 +737,7 @@ export function useNoteTreeDrag(containerRef: MutableRef<HTMLElement | null | un
toast.showPersistent({
...dragNotEnabledMessage,
id: "drag-not-enabled",
closeAfter: 5000
delay: 5000
});
}
}