fix: improved random filter

This commit is contained in:
ner committed 2023-08-10 12:22:54 +03:00
1 parent 89e76f5df6
commit 5d7a3464ed
9 files changed
+2921 -73

No files matched your search

@@ -0,0 +1,29 @@
import { FC } from 'react';
import { Dialog, DialogContent } from '@/components/ui/dialog';
interface Props {
trailerKey?: string;
onClose: () => void;
}
const Trailer: FC<Props> = ({ trailerKey, onClose }) => {
return (
trailerKey && (
<Dialog defaultOpen={true} onOpenChange={(isOpen) => !isOpen && onClose()}>
<DialogContent className='block p-0 min-h-[400px] aspect-w-16 aspect-h-9'>
<iframe
allow='autoplay'
className='border-none rounded-lg'
width='100%'
height='100%'
src={`//www.youtube.com/embed/${trailerKey}?autoplay=1`}
allowFullScreen
/>
</DialogContent>
</Dialog>
)
);
};
export default Trailer;