import React from 'react'; import { Badge, Link, Stack, Td, Tr } from '@chakra-ui/react'; import MasterActionsMenu from '../MasterActionsMenu'; import { getTimeSlot } from '../../lib'; export interface Schedule { id: string; startWashTime: string; endWashTime: string; } export type MasterProps = { id: string; name: string; phone: string; schedule: Schedule[]; }; const MasterItem = ({ name, phone, id, schedule }) => { return ( {name} {schedule.map(({ startWashTime, endWashTime }, index) => ( {getTimeSlot(startWashTime, endWashTime)} ))} {phone} ); }; export default MasterItem;