import {Image, StyleSheet, Text, View} from "react-native"; import {BadgeFilm} from "../screens/HomeScreen"; import * as React from "react"; type ListWidgetProps = { imageURL: string name: String runtime: number director: string } const styles = StyleSheet.create({ filmCard: { width: 70, height: 100, borderRadius: 8, }, }); export function ListWidget(props: ListWidgetProps) { function formatTime(time: number) { const hours = Math.floor(time / 60); const minutes = time % 60; return `${hours}h ${minutes < 10 ? `0${minutes}` : minutes}m`; } return ( {props.director} {formatTime(props.runtime)} ); }