Feat/web workflow improvements (#27981)
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: johnny0120 <johnny0120@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Wood <tuiskuwood@outlook.com>
This commit is contained in:
@@ -6,7 +6,14 @@ type Props = {
|
||||
}
|
||||
|
||||
const VideoGallery: React.FC<Props> = ({ srcs }) => {
|
||||
return (<><br/>{srcs.map((src, index) => (<React.Fragment key={`video_${index}`}><br/><VideoPlayer src={src}/></React.Fragment>))}</>)
|
||||
const validSrcs = srcs.filter(src => src)
|
||||
if (validSrcs.length === 0) return null
|
||||
|
||||
return (
|
||||
<div className="my-3">
|
||||
<VideoPlayer srcs={validSrcs} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default React.memo(VideoGallery)
|
||||
|
||||
Reference in New Issue
Block a user