♻️(frontend) use keyprefix args

My bad, avoid repeating the same prefix.
This commit is contained in:
lebaudantoine
2024-09-16 11:28:26 +02:00
committed by aleb_the_flash
parent 95116f70e8
commit 3ba913bb21

View File

@@ -66,7 +66,7 @@ export function ControlBar({
onDeviceError, onDeviceError,
...props ...props
}: ControlBarProps) { }: ControlBarProps) {
const { t } = useTranslation('rooms') const { t } = useTranslation('rooms', { keyPrefix: 'controls' })
const [isChatOpen, setIsChatOpen] = React.useState(false) const [isChatOpen, setIsChatOpen] = React.useState(false)
const layoutContext = useMaybeLayoutContext() const layoutContext = useMaybeLayoutContext()
React.useEffect(() => { React.useEffect(() => {
@@ -156,11 +156,7 @@ export function ControlBar({
} }
> >
{showText && {showText &&
t( t(isScreenShareEnabled ? 'stopScreenShare' : 'shareScreen')}
isScreenShareEnabled
? 'controls.stopScreenShare'
: 'controls.shareScreen'
)}
</TrackToggle> </TrackToggle>
)} )}
<HandToggle /> <HandToggle />