karusell
This commit is contained in:
43
src/components/xxx.tsx
Normal file
43
src/components/xxx.tsx
Normal file
@ -0,0 +1,43 @@
|
||||
// import React from 'react';
|
||||
// import { Carousel, TextCarousel } from '@mantine/core';
|
||||
// import { useSelector } from 'react-redux';
|
||||
|
||||
// import { RootState } from '../../app/store';
|
||||
|
||||
// interface MediaCarouselProps {
|
||||
// mediaType: 'video' | 'photo';
|
||||
// }
|
||||
|
||||
// const MediaCarousel: React.FC<MediaCarouselProps> = ({ mediaType }) => {
|
||||
// const media = useSelector((state: RootState) => state.media);
|
||||
// const filteredMedia = media.filter((m) => m.type === mediaType);
|
||||
|
||||
// return (
|
||||
// <Carousel
|
||||
// withControls
|
||||
// transition="fade"
|
||||
// offset={5}
|
||||
// effect="fade"
|
||||
// color="gray"
|
||||
// radius={5}
|
||||
// height={300}
|
||||
// style={{ marginTop: '2rem' }}
|
||||
// >
|
||||
// {filteredMedia.map((m) =>
|
||||
// mediaType === 'video' ? (
|
||||
// <video key={m.id} controls>
|
||||
// <source src={m.url} type="video/mp4" />
|
||||
// <TextCarousel delay={3000} transition="fade">
|
||||
// Sorry, your browser does not support embedded videos.
|
||||
// </TextCarousel>
|
||||
// </video>
|
||||
// ) : (
|
||||
// <img key={m.id} src={m.url} alt={m.title} />
|
||||
// ),
|
||||
// )}
|
||||
// </Carousel>
|
||||
// );
|
||||
// };
|
||||
|
||||
// export default MediaCarousel
|
||||
export{}
|
||||
Reference in New Issue
Block a user