fix: handle start recording

This commit is contained in:
karishmas6
2024-10-21 01:07:11 +05:30
parent a78121f40b
commit 5d6f4faa21

View File

@@ -92,7 +92,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl
const [rows, setRows] = React.useState<Data[]>([]);
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);
};