This commit is contained in:
2023-03-12 00:42:40 +01:00
parent 8732b43c8a
commit 6932610e86
12 changed files with 266 additions and 4 deletions

View File

@ -0,0 +1,26 @@
import React from "react";
import { Carousel } from '@mantine/carousel';
import VideoPlayer from "./VideoPlayer"; // assuming VideoPlayer and ImageViewer are custom components to display videos and photos
import ImageViewer from "./ImageViewer"; // assuming VideoPlayer and ImageViewer are custom components to display videos and photos
type Props = {
videos: string[];
photos: string[];
};
const GalleryCarousel: React.FC<Props> = ({ videos, photos }): JSX.Element => {
return (
<Carousel
variant="light"
>
{photos.map((photo, index) => (
<ImageViewer key={`gallery-photo-${index}`} url={photo} />
))}
{videos.map((video, index) => (
<VideoPlayer key={`gallery-video-${index}`} url={video} />
))}
</Carousel>
);
};
export default GalleryCarousel;