diff --git a/www/app/[domain]/transcripts/shareAndPrivacy.tsx b/www/app/[domain]/transcripts/shareAndPrivacy.tsx index b2b33e58..864a66ab 100644 --- a/www/app/[domain]/transcripts/shareAndPrivacy.tsx +++ b/www/app/[domain]/transcripts/shareAndPrivacy.tsx @@ -5,7 +5,7 @@ import { ShareMode, toShareMode } from "../../lib/shareMode"; import { GetTranscript, GetTranscriptTopic, UpdateTranscript } from "../../api"; import { Box, - Heading, + Flex, IconButton, Modal, ModalBody, @@ -41,8 +41,8 @@ export default function ShareAndPrivacy(props: ShareAndPrivacyProps) { const [isOwner, setIsOwner] = useState(false); const [shareMode, setShareMode] = useState( shareOptions.find( - (option) => option.value === props.transcriptResponse.share_mode, - ) || shareOptions[0], + (option) => option.value === props.transcriptResponse.share_mode + ) || shareOptions[0] ); const [shareLoading, setShareLoading] = useState(false); const requireLogin = featureEnabled("requireLogin"); @@ -59,12 +59,12 @@ export default function ShareAndPrivacy(props: ShareAndPrivacyProps) { const updatedTranscript = await api.v1TranscriptUpdate( props.transcriptResponse.id, - requestBody, + requestBody ); setShareMode( shareOptions.find( - (option) => option.value === updatedTranscript.share_mode, - ) || shareOptions[0], + (option) => option.value === updatedTranscript.share_mode + ) || shareOptions[0] ); setShareLoading(false); }; @@ -125,20 +125,21 @@ export default function ShareAndPrivacy(props: ShareAndPrivacyProps) { Share options - {!requireLogin || - (shareMode.value !== "private" && ( + + {requireLogin && ( - ))} + )} + + - diff --git a/www/app/[domain]/transcripts/shareZulip.tsx b/www/app/[domain]/transcripts/shareZulip.tsx index 988d4f2e..e7c2c092 100644 --- a/www/app/[domain]/transcripts/shareZulip.tsx +++ b/www/app/[domain]/transcripts/shareZulip.tsx @@ -2,21 +2,27 @@ import { useState } from "react"; import { featureEnabled } from "../domainContext"; import ShareModal from "./[transcriptId]/shareModal"; import { GetTranscript, GetTranscriptTopic } from "../../api"; -import { Button } from "@chakra-ui/react"; +import { BoxProps, Button } from "@chakra-ui/react"; type ShareZulipProps = { transcriptResponse: GetTranscript; topicsResponse: GetTranscriptTopic[]; + disabled: boolean; }; -export default function ShareZulip(props: ShareZulipProps) { +export default function ShareZulip(props: ShareZulipProps & BoxProps) { const [showModal, setShowModal] = useState(false); if (!featureEnabled("sendToZulip")) return null; return ( <> -