Files
movie-advisor/components/Random/index.tsx
T
2024-10-05 17:23:37 +03:00

21 lines
490 B
TypeScript

'use client';
import Preview from '../Preview';
import Carousel from './components/Carousel';
import useRandomMovie from './useRandomMovie';
const Random = () => {
const { movies, movie, index, onIndexChange, fetchNextPage } = useRandomMovie();
return (
<Preview
show={movie}
className='rounded-md bg-background'
card={<Carousel index={index} shows={movies} onIndexChange={onIndexChange} onEndReached={fetchNextPage} />}
/>
);
};
export default Random;