From 5d6f4faa214e9089d44808b065c4ef2ca728bf72 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:07:11 +0530 Subject: [PATCH] fix: handle start recording --- src/components/molecules/RecordingsTable.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index a65c23d1..8ca6ee50 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -92,7 +92,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl const [rows, setRows] = React.useState([]); const [isModalOpen, setModalOpen] = React.useState(false); - const { notify, setRecordings, browserId, setBrowserId, recordingUrl, setRecordingUrl } = useGlobalInfoStore(); + const { notify, setRecordings, browserId, setBrowserId, recordingUrl, setRecordingUrl, recordingName, setRecordingName, recordingId, setRecordingId } = useGlobalInfoStore(); const navigate = useNavigate(); const handleChangePage = (event: unknown, newPage: number) => { @@ -132,8 +132,16 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl setModalOpen(true); }; + const handleStartRecording = () => { + setBrowserId('new-recording'); + setRecordingName(''); + setRecordingId(''); + navigate('/recording'); + } + const startRecording = () => { setModalOpen(false); + handleStartRecording(); notify('info', 'New Recording started for ' + recordingUrl); };