|
|
@ -7,10 +7,15 @@ const { Option } = Select; |
|
|
|
|
|
|
|
function DataTop5(props) { |
|
|
|
const { structures, accessToken, videoList } = props; |
|
|
|
const [showVideoList, setShowVideoList] = useState(videoList[0]?.url); |
|
|
|
const [showVideoList, setShowVideoList] = useState(); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
if (videoList.length && structures.length) setShowVideoList(videoList.filter(v => v.structId === structures[0].id)); |
|
|
|
if (videoList.length && structures.length) { |
|
|
|
setShowVideoList(videoList.filter(v => v.structId === structures[0].id)); |
|
|
|
if (!showVideoList) { |
|
|
|
setShowVideoList(videoList[0]?.url) |
|
|
|
} |
|
|
|
} |
|
|
|
}, [videoList]) |
|
|
|
|
|
|
|
const renderSubtitle = () => ( |
|
|
|