
const DistanceDetails = (props)=>{
    return(
        <table className="table table-bordered">
            <tbody>
                <tr>
                    <th>Distance between two cities: </th>
                    <td>{props.data.distance} {props.data.unit}</td>
                </tr>
                <tr>
                    <th>Associated city for zip code: {props.from}</th>
                    <td>{props.data.sourceAssociateCity}</td>
                </tr>
                <tr>
                    <th>Associated city for zip code: {props.to}</th>
                    <td>{props.data.destinationAssociateCity}</td>
                </tr>
            </tbody>
        </table>
    )
}

export default DistanceDetails;