mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: reset copyStatus on export dialog settings change (#8443)
This commit is contained in:
parent
576bc0dbe5
commit
16cae4fc07
2 changed files with 21 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import { useRef, useState } from "react";
|
||||
import { useCallback, useRef, useState } from "react";
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
|
||||
|
@ -15,8 +15,13 @@ export const useCopyStatus = () => {
|
|||
}, TIMEOUT);
|
||||
};
|
||||
|
||||
const resetCopyStatus = useCallback(() => {
|
||||
setCopyStatus(null);
|
||||
}, []);
|
||||
|
||||
return {
|
||||
copyStatus,
|
||||
resetCopyStatus,
|
||||
onCopy,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue