consent dialog api cleanup

This commit is contained in:
Igor Loskutov
2025-06-18 15:55:16 -04:00
parent c23e0e07ef
commit 58f51697b0
2 changed files with 59 additions and 100 deletions

View File

@@ -1,48 +0,0 @@
import React from "react";
import {
Modal,
ModalOverlay,
ModalContent,
ModalHeader,
ModalBody,
Button,
Text,
HStack,
} from "@chakra-ui/react";
interface AudioConsentDialogProps {
isOpen: boolean;
onClose: () => void;
onConsent: (given: boolean) => void;
}
const AudioConsentDialog = ({ isOpen, onClose, onConsent }: AudioConsentDialogProps) => {
const handleConsent = (given: boolean) => {
onConsent(given);
onClose();
};
return (
<Modal isOpen={isOpen} onClose={onClose} closeOnOverlayClick={false} closeOnEsc={false}>
<ModalOverlay />
<ModalContent>
<ModalHeader>Audio Storage Consent</ModalHeader>
<ModalBody pb={6}>
<Text mb={4}>
Can we have your permission to store this meeting's audio recording on our servers?
</Text>
<HStack spacing={4}>
<Button colorScheme="green" onClick={() => handleConsent(true)}>
Yes, store the audio
</Button>
<Button colorScheme="red" onClick={() => handleConsent(false)}>
No, delete after transcription
</Button>
</HStack>
</ModalBody>
</ModalContent>
</Modal>
);
};
export default AudioConsentDialog;