import { HStack, Icon, Text } from 'native-base'; import { MaterialIcons } from '@expo/vector-icons'; type DurationComponentProps = { length: number | undefined; }; const DurationComponent = ({ length }: DurationComponentProps) => { const minutes = Math.floor((length ?? 0) / 60); const seconds = Math.round((length ?? 0) - minutes * 60); return ( {length ? `${minutes}'${seconds}` : "--'--"} ); }; export default DurationComponent;