From 326dcc8fa32ecf07276e23ea7bafd4328bc3124a Mon Sep 17 00:00:00 2001 From: amhsirak Date: Fri, 6 Jun 2025 00:44:12 +0530 Subject: [PATCH] feat: pass params for abort handler --- src/pages/MainPage.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx index f2559666..b43f5e50 100644 --- a/src/pages/MainPage.tsx +++ b/src/pages/MainPage.tsx @@ -49,14 +49,14 @@ export const MainPage = ({ handleEditRecording, initialContent }: MainPageProps) const { notify, setRerenderRuns, setRecordingId } = useGlobalInfoStore(); const navigate = useNavigate(); - const abortRunHandler = (runId: string) => { + const abortRunHandler = (runId: string, robotName: string, browserId: string) => { aborted = true; notifyAboutAbort(runId).then(async (response) => { if (response) { - notify('success', t('main_page.notifications.abort_success', { name: runningRecordingName })); + notify('success', t('main_page.notifications.abort_success', { name: robotName })); await stopRecording(ids.browserId); } else { - notify('error', t('main_page.notifications.abort_failed', { name: runningRecordingName })); + notify('error', t('main_page.notifications.abort_failed', { name: robotName })); } setRerenderRuns(true); }) @@ -157,7 +157,7 @@ export const MainPage = ({ handleEditRecording, initialContent }: MainPageProps) case 'runs': return abortRunHandler(ids.runId)} + abortRunHandler={abortRunHandler} runId={ids.runId} runningRecordingName={runningRecordingName} />;