Skip to content

Commit c65ff2d

Browse files
committed
🩹(frontend) disable subtitle settings when feature is unavailable
Hide or disable settings related to the subtitle feature when the feature flag is not enabled.
1 parent ea1c90d commit c65ff2d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/frontend/src/features/subtitle/component/CaptionsSettings.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
CAPTION_TEXT_SIZE_OPTIONS,
1111
CAPTION_COLOR_OPTIONS,
1212
} from '@/stores/accessibility'
13+
import { useAreSubtitlesAvailable } from '../hooks/useAreSubtitlesAvailable'
1314

1415
export const CaptionsSettings = () => {
1516
const { t } = useTranslation('settings', {
@@ -44,6 +45,9 @@ export const CaptionsSettings = () => {
4445
[t]
4546
)
4647

48+
const areSubtitlesAvailable = useAreSubtitlesAvailable()
49+
if (!areSubtitlesAvailable) return null
50+
4751
return (
4852
<li>
4953
<H

0 commit comments

Comments
 (0)