From 0a9ed960ee5ef8409b61dc5d747912b17a521160 Mon Sep 17 00:00:00 2001 From: Guillaume Lung Date: Thu, 26 Oct 2023 15:13:18 +0200 Subject: [PATCH] fix: Localize "Screen Share" caption (#1164) --- .../src/components/CallControls/ScreenShareButton.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-sdk/src/components/CallControls/ScreenShareButton.tsx b/packages/react-sdk/src/components/CallControls/ScreenShareButton.tsx index 189d840bac..0adc0b6938 100644 --- a/packages/react-sdk/src/components/CallControls/ScreenShareButton.tsx +++ b/packages/react-sdk/src/components/CallControls/ScreenShareButton.tsx @@ -13,14 +13,14 @@ export type ScreenShareButtonProps = { caption?: string; }; -export const ScreenShareButton = ({ - caption = 'Screen Share', -}: ScreenShareButtonProps) => { +export const ScreenShareButton = (props: ScreenShareButtonProps) => { const call = useCall(); const { useHasOngoingScreenShare } = useCallStateHooks(); const isSomeoneScreenSharing = useHasOngoingScreenShare(); const { t } = useI18n(); + const { caption = t('Screen Share') } = props; + const { toggleScreenShare, isAwaitingPermission, isScreenSharing } = useToggleScreenShare();