From b9d39912bf63ce3d4ce86d45a09d631457105428 Mon Sep 17 00:00:00 2001 From: duckietm Date: Thu, 3 Nov 2022 10:33:10 +0000 Subject: [PATCH] Fix the Youtube playlist layout --- .../furniture/FurnitureYoutubeDisplayView.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/room/widgets/furniture/FurnitureYoutubeDisplayView.tsx b/src/components/room/widgets/furniture/FurnitureYoutubeDisplayView.tsx index 18585713..3bae762c 100644 --- a/src/components/room/widgets/furniture/FurnitureYoutubeDisplayView.tsx +++ b/src/components/room/widgets/furniture/FurnitureYoutubeDisplayView.tsx @@ -2,10 +2,15 @@ import { FC, useEffect, useState } from 'react'; import YouTube, { Options } from 'react-youtube'; import { YouTubePlayer } from 'youtube-player/dist/types'; import { LocalizeText, YoutubeVideoPlaybackStateEnum } from '../../../../api'; -import { Grid, LayoutGridItem, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common'; +import { AutoGrid, AutoGridProps, LayoutGridItem, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common'; import { useFurnitureYoutubeWidget } from '../../../../hooks'; -export const FurnitureYoutubeDisplayView: FC<{}> = props => +interface FurnitureYoutubeDisplayViewProps extends AutoGridProps +{ + +} + +export const FurnitureYoutubeDisplayView: FC<{}> = FurnitureYoutubeDisplayViewProps => { const [ player, setPlayer ] = useState(null); const { objectId = -1, videoId = null, videoStart = 0, videoEnd = 0, currentVideoState = null, selectedVideo = null, playlists = [], onClose = null, previous = null, next = null, pause = null, play = null, selectVideo = null } = useFurnitureYoutubeWidget(); @@ -86,16 +91,16 @@ export const FurnitureYoutubeDisplayView: FC<{}> = props =>
{ LocalizeText('widget.furni.video_viewer.playlists') }
- + { playlists && playlists.map((entry, index) => { return ( selectVideo(entry.video) } itemActive={ (entry.video === selectedVideo) }> - { entry.title } - { entry.description } + { entry.title } - ) + ) }) } - +