diff --git a/src/react-components/room/InvitePopover.js b/src/react-components/room/InvitePopover.js index 436666b12b..d47dcef0c5 100644 --- a/src/react-components/room/InvitePopover.js +++ b/src/react-components/room/InvitePopover.js @@ -18,6 +18,7 @@ import { ReactComponent as ShareIcon } from "../icons/Share.svg"; function InvitePopoverContent({ url, embed, inviteRequired, fetchingInvite, inviteUrl, revokeInvite, shareUrlHandler }) { const [isShareInEnglish, setIsShareInEnglish] = useState(false); + const intl = useIntl(); return ( {inviteRequired ? ( @@ -29,11 +30,13 @@ function InvitePopoverContent({ url, embed, inviteRequired, fetchingInvite, invi - } - checked={isShareInEnglish} - onChange={_event => setIsShareInEnglish(inEnglish => !inEnglish)} - /> + { ! intl?.locale?.startsWith?.('en') && + } + checked={isShareInEnglish} + onChange={_event => setIsShareInEnglish(inEnglish => !inEnglish)} + /> + } } @@ -47,11 +50,13 @@ function InvitePopoverContent({ url, embed, inviteRequired, fetchingInvite, invi - } - checked={isShareInEnglish} - onChange={_event => setIsShareInEnglish(inEnglish => !inEnglish)} - /> + { ! intl?.locale?.startsWith?.('en') && + } + checked={isShareInEnglish} + onChange={_event => setIsShareInEnglish(inEnglish => !inEnglish)} + /> + } } - } - checked={isShareInEnglish} - onChange={_event => setIsShareInEnglish(inEnglish => !inEnglish)} - /> + { ! intl?.locale?.startsWith?.('en') && + } + checked={isShareInEnglish} + onChange={_event => setIsShareInEnglish(inEnglish => !inEnglish)} + /> + } }