fix(): Use captions.dication flag to show/hide dication button

This commit is contained in:
Lucas Fialho Zawacki 2024-02-06 15:01:24 -03:00
parent 8d741fa016
commit a744193536

View File

@ -92,7 +92,8 @@ const Captions = ({
'aria-label': intl.formatMessage(intlMessages.hide), 'aria-label': intl.formatMessage(intlMessages.hide),
label: autoTranscription ? intl.formatMessage(intlMessages.title) : name, label: autoTranscription ? intl.formatMessage(intlMessages.title) : name,
}} }}
customRightButton={Service.amICaptionsOwner(ownerId) ? ( customRightButton={dictation ? (
Service.amICaptionsOwner(ownerId) ? (
<span> <span>
<Button <Button
onClick={dictating onClick={dictating
@ -103,7 +104,6 @@ const Captions = ({
: intl.formatMessage(intlMessages.dictationStart)} : intl.formatMessage(intlMessages.dictationStart)}
aria-describedby="dictationBtnDesc" aria-describedby="dictationBtnDesc"
color={dictating ? 'danger' : 'primary'} color={dictating ? 'danger' : 'primary'}
disabled={!dictation}
/> />
<div id="dictationBtnDesc" hidden> <div id="dictationBtnDesc" hidden>
{dictating {dictating
@ -119,7 +119,7 @@ const Captions = ({
aria-label={intl.formatMessage(intlMessages.takeOwnership)} aria-label={intl.formatMessage(intlMessages.takeOwnership)}
label={intl.formatMessage(intlMessages.takeOwnership)} label={intl.formatMessage(intlMessages.takeOwnership)}
/> />
)} )) : null}
/> />
<PadContainer <PadContainer
externalId={locale} externalId={locale}