mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 13:19:05 +00:00
player and share
This commit is contained in:
30
www/app/[domain]/transcripts/shareZulip.tsx
Normal file
30
www/app/[domain]/transcripts/shareZulip.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { useState } from "react";
|
||||
import { featureEnabled } from "../domainContext";
|
||||
import ShareModal from "./[transcriptId]/shareModal";
|
||||
import { GetTranscript, GetTranscriptTopic } from "../../api";
|
||||
import { Button } from "@chakra-ui/react";
|
||||
|
||||
type ShareZulipProps = {
|
||||
transcriptResponse: GetTranscript;
|
||||
topicsResponse: GetTranscriptTopic[];
|
||||
};
|
||||
|
||||
export default function ShareZulip(props: ShareZulipProps) {
|
||||
const [showModal, setShowModal] = useState(false);
|
||||
if (!featureEnabled("sendToZulip")) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button colorScheme="blue" onClick={() => setShowModal(true)}>
|
||||
➡️ Zulip
|
||||
</Button>
|
||||
|
||||
<ShareModal
|
||||
transcript={props.transcriptResponse}
|
||||
topics={props.topicsResponse}
|
||||
show={showModal}
|
||||
setShow={(v) => setShowModal(v)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user