fix: hide menu if it is empty

This commit is contained in:
ner committed 2024-10-13 19:15:06 +03:00
1 parent 4928764bf3
commit 644aca506e
1 file changed
+2 -2
@@ -40,8 +40,8 @@ const Player: FC<Props> = ({ videos, subtitles, onReady }) => {
slots={{
playLargeButton: null,
afterVolumeSlider: <ul className='w-2' />,
beforeSettings: <CaptionsMenu />,
settings: <VideosMenu source={source} sources={videos} onChange={setIndex} />,
beforeSettings: Boolean(subtitles.length) && <CaptionsMenu />,
settings: videos.length > 1 && <VideosMenu source={source} sources={videos} onChange={setIndex} />,
settingsMenu: null,
captionsButton: null
}}