feat: generate truly unique action ids

This commit is contained in:
Rohit
2025-05-26 21:41:40 +05:30
parent 515ad5b7c9
commit 3729145306
2 changed files with 8 additions and 8 deletions

View File

@@ -139,20 +139,20 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
const handleStartGetText = () => {
setIsCaptureTextConfirmed(false);
const newActionId = `text-${Date.now()}`;
const newActionId = `text-${crypto.randomUUID()}`;
setCurrentTextActionId(newActionId);
startGetText();
}
const handleStartGetList = () => {
setIsCaptureListConfirmed(false);
const newActionId = `list-${Date.now()}`;
const newActionId = `list-${crypto.randomUUID()}`;
setCurrentListActionId(newActionId);
startGetList();
}
const handleStartGetScreenshot = () => {
const newActionId = `screenshot-${Date.now()}`;
const newActionId = `screenshot-${crypto.randomUUID()}`;
setCurrentScreenshotActionId(newActionId);
startGetScreenshot();
};