chore: lint
This commit is contained in:
@@ -10,56 +10,56 @@ import { GenericModal } from "../atoms/GenericModal";
|
|||||||
|
|
||||||
const BrowserRecordingSave = () => {
|
const BrowserRecordingSave = () => {
|
||||||
const [openModal, setOpenModal] = useState<boolean>(false);
|
const [openModal, setOpenModal] = useState<boolean>(false);
|
||||||
const { recordingName, browserId, setBrowserId, notify } = useGlobalInfoStore();
|
const { recordingName, browserId, setBrowserId, notify } = useGlobalInfoStore();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const goToMainMenu = async () => {
|
const goToMainMenu = async () => {
|
||||||
if (browserId) {
|
if (browserId) {
|
||||||
await stopRecording(browserId);
|
await stopRecording(browserId);
|
||||||
notify('warning', 'Current Recording was terminated');
|
notify('warning', 'Current Recording was terminated');
|
||||||
setBrowserId(null);
|
setBrowserId(null);
|
||||||
}
|
}
|
||||||
navigate('/');
|
navigate('/');
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container>
|
<Grid container>
|
||||||
<Grid item xs={12} md={3} lg={3}>
|
<Grid item xs={12} md={3} lg={3}>
|
||||||
<div style={{
|
<div style={{
|
||||||
marginTop: '10px',
|
marginTop: '10px',
|
||||||
// marginLeft: '10px',
|
// marginLeft: '10px',
|
||||||
color: 'white',
|
color: 'white',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
background: '#ff00c3',
|
background: '#ff00c3',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
borderRadius: '5px',
|
borderRadius: '5px',
|
||||||
padding: '7.5px',
|
padding: '7.5px',
|
||||||
width: 'calc(100% - 20px)', // Ensure it takes full width but with padding
|
width: 'calc(100% - 20px)', // Ensure it takes full width but with padding
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
}}>
|
}}>
|
||||||
<Button onClick={() => setOpenModal(true)} variant="outlined" style={{ marginLeft: "25px" }} size="small" color="error">
|
<Button onClick={() => setOpenModal(true)} variant="outlined" style={{ marginLeft: "25px" }} size="small" color="error">
|
||||||
Discard
|
Discard
|
||||||
</Button>
|
</Button>
|
||||||
<GenericModal isOpen={openModal} onClose={() => setOpenModal(false)} modalStyle={modalStyle}>
|
<GenericModal isOpen={openModal} onClose={() => setOpenModal(false)} modalStyle={modalStyle}>
|
||||||
<Box p={2}>
|
<Box p={2}>
|
||||||
<h2>Are you sure you want to discard the recording?</h2>
|
<h2>Are you sure you want to discard the recording?</h2>
|
||||||
<Box display="flex" justifyContent="space-between" mt={2}>
|
<Box display="flex" justifyContent="space-between" mt={2}>
|
||||||
<Button onClick={goToMainMenu} variant="contained" color="error">
|
<Button onClick={goToMainMenu} variant="contained" color="error">
|
||||||
Discard
|
Discard
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={() => setOpenModal(false)} variant="outlined">
|
<Button onClick={() => setOpenModal(false)} variant="outlined">
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</GenericModal>
|
</GenericModal>
|
||||||
<SaveRecording fileName={recordingName} />
|
<SaveRecording fileName={recordingName} />
|
||||||
</div>
|
</div>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BrowserRecordingSave
|
export default BrowserRecordingSave
|
||||||
|
|||||||
Reference in New Issue
Block a user