From bc0a2bd7fd4c0f5130e9ca2de30aff7ea11685ca Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 20 Oct 2024 03:30:22 +0530 Subject: [PATCH] feat: finish and discard buttons, bottom of panel --- .../molecules/BrowserRecordingSave.tsx | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/components/molecules/BrowserRecordingSave.tsx diff --git a/src/components/molecules/BrowserRecordingSave.tsx b/src/components/molecules/BrowserRecordingSave.tsx new file mode 100644 index 00000000..e7957697 --- /dev/null +++ b/src/components/molecules/BrowserRecordingSave.tsx @@ -0,0 +1,49 @@ +import React from 'react' +import { Paper, Grid, IconButton, Button } from '@mui/material'; +import { SaveRecording } from "./SaveRecording"; +import { Circle, Add, Logout, Clear } from "@mui/icons-material"; +import { useGlobalInfoStore } from '../../context/globalInfo'; +import { stopRecording } from "../../api/recording"; +import { Link, useLocation, useNavigate } from 'react-router-dom'; + + +const BrowserRecordingSave = () => { + const { recordingName, browserId, setBrowserId, notify } = useGlobalInfoStore(); + const navigate = useNavigate(); + + const goToMainMenu = async () => { + if (browserId) { + await stopRecording(browserId); + notify('warning', 'Current Recording was terminated'); + setBrowserId(null); + } + navigate('/'); + }; + + return ( + + +
+ + +
+
+
+ ) +} + +export default BrowserRecordingSave \ No newline at end of file