Skip to content

Commit 9e5abe4

Browse files
committed
OV-311: * get video preview back
1 parent 5f8b668 commit 9e5abe4

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

frontend/src/bundles/home/components/video-card/video-card.tsx

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { getVideoMetadata } from '@remotion/media-utils';
22
import { format } from 'date-fns';
33

4-
import photo from '~/assets/img/photo.png';
54
import {
65
Box,
76
Flex,
@@ -34,9 +33,16 @@ type Properties = {
3433
name: string;
3534
url: string | null;
3635
createdAt: string;
36+
previewUrl: string;
3737
};
3838

39-
const VideoCard: React.FC<Properties> = ({ id, name, url, createdAt }) => {
39+
const VideoCard: React.FC<Properties> = ({
40+
id,
41+
name,
42+
url,
43+
createdAt,
44+
previewUrl,
45+
}) => {
4046
const dispatch = useAppDispatch();
4147

4248
const [isVideoModalOpen, setIsVideoModalOpen] = useState(false);
@@ -81,8 +87,17 @@ const VideoCard: React.FC<Properties> = ({ id, name, url, createdAt }) => {
8187

8288
return (
8389
<Box borderRadius="8px" bg="white" padding="7px">
84-
<Box position="relative" role="group">
85-
<Image src={photo} alt="Video preview" borderRadius="5px" />
90+
<Box
91+
position="relative"
92+
role="group"
93+
height="155px"
94+
overflow="hidden"
95+
>
96+
<Image
97+
src={previewUrl}
98+
alt="Video preview"
99+
className={styles['preview-image']}
100+
/>
86101
{!url && (
87102
<Box
88103
className={styles['draft-box']}

0 commit comments

Comments
 (0)