feat: recordingURl

This commit is contained in:
karishmas6
2024-10-11 04:51:19 +05:30
parent 8d5b286c00
commit 2ed09970e9

View File

@@ -20,6 +20,8 @@ interface GlobalInfo {
setRecordingId: (newId: string | null) => void; setRecordingId: (newId: string | null) => void;
recordingName: string; recordingName: string;
setRecordingName: (recordingName: string) => void; setRecordingName: (recordingName: string) => void;
recordingUrl: string;
setRecordingUrl: (recordingUrl: string) => void;
}; };
class GlobalInfoStore implements Partial<GlobalInfo> { class GlobalInfoStore implements Partial<GlobalInfo> {
@@ -35,6 +37,7 @@ class GlobalInfoStore implements Partial<GlobalInfo> {
recordings: string[] = []; recordings: string[] = [];
rerenderRuns = false; rerenderRuns = false;
recordingName = ''; recordingName = '';
recordingUrl = '';
}; };
const globalInfoStore = new GlobalInfoStore(); const globalInfoStore = new GlobalInfoStore();
@@ -51,6 +54,7 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => {
const [recordingLength, setRecordingLength] = useState<number>(globalInfoStore.recordingLength); const [recordingLength, setRecordingLength] = useState<number>(globalInfoStore.recordingLength);
const [recordingId, setRecordingId] = useState<string | null>(globalInfoStore.recordingId); const [recordingId, setRecordingId] = useState<string | null>(globalInfoStore.recordingId);
const [recordingName, setRecordingName] = useState<string>(globalInfoStore.recordingName); const [recordingName, setRecordingName] = useState<string>(globalInfoStore.recordingName);
const [recordingUrl, setRecordingUrl] = useState<string>(globalInfoStore.recordingUrl);
const notify = (severity: 'error' | 'warning' | 'info' | 'success', message: string) => { const notify = (severity: 'error' | 'warning' | 'info' | 'success', message: string) => {
setNotification({ severity, message, isOpen: true }); setNotification({ severity, message, isOpen: true });
@@ -86,7 +90,9 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => {
recordingId, recordingId,
setRecordingId, setRecordingId,
recordingName, recordingName,
setRecordingName setRecordingName,
recordingUrl,
setRecordingUrl,
}} }}
> >
{children} {children}