doc: import BrowserRouter, Routes, and Route from react-router-dom, and import...
This commit is contained in:
1 parent
96a9bbdbb5
commit
065dd50d83
24 files changed
+576
-7
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user