doc: import BrowserRouter, Routes, and Route from react-router-dom, and import...

This commit is contained in:
Leon Xu committed 2022-08-28 03:16:51 +00:00
1 parent 96a9bbdbb5
commit 065dd50d83
24 files changed
+576 -7

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { Stack, Box } from '@mui/material';
import { VideoCard, ChannelCard, Loader } from './'
const Videos = ({ videos, direction }) => {
if (!videos?.length) return <Loader />
return (
<Stack direction={ direction || "row"} flexWrap={"wrap"} justifyContent={"start"} gap={2}>
{videos.map((item, idx) => (
<Box key={idx}>
{item.id.videoId && <VideoCard video={item}/>}
{item.id.channelId && <ChannelCard channelDetail={item}/>}
</Box>
))}
</Stack>
)
}
export default Videos;