From 998bf45771914082bdfcd6508708604fa1b0fffe Mon Sep 17 00:00:00 2001 From: Samy Ouyahia Date: Thu, 6 Jun 2024 11:21:57 +0200 Subject: [PATCH] Fixed the onFinishUploadPicture callback not being called with the proper params --- packages/camera/src/components/Capture/capture.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/camera/src/components/Capture/capture.js b/packages/camera/src/components/Capture/capture.js index 3e7a69e4c..0c7aa59b5 100644 --- a/packages/camera/src/components/Capture/capture.js +++ b/packages/camera/src/components/Capture/capture.js @@ -354,14 +354,14 @@ const Capture = forwardRef(({ } }, [setAddDamageStatus, lastAddDamageHelpTimestamp]); - const handleOnFinishUploadPicture = useCallback(async () => { + const handleOnFinishUploadPicture = useCallback(async (state, a) => { try { await onNavigateToNextSight(); } catch (err) { log([`Error in \`\` \`goNextSight()\`: ${err}`], 'err'); } finally { api.goNextSight(); - onFinishUploadPicture(); + onFinishUploadPicture(state, a); } }, [api]);