import React from 'react' import { Arrow } from './Arrow' import { PercentageOverlay } from './PercentageOverlay' import { VideoProgressStore } from '../lib/storage/VideoProgress' import './MovieRow.css' // title: string // onClick: () => void export function MovieRow(props) { const progressData = VideoProgressStore.get(); let progress; let percentage = null; if (props.type === "movie") { progress = progressData?.[props.source]?.movie?.[props.slug]?.full if (progress) { percentage = Math.floor((progress.currentlyAt / progress.totalDuration) * 100) } } function handleKeyPress(event){ if ((event.code === 'Enter' || event.code === 'Space') && props.onClick){ props.onClick(); } } return (
Watch {props.type}