import React from 'react';
import './tracklist.scss'




class Tracklist extends React.Component
{
    render()
    {
        
        return(
                <div className="tracklist">
                    <table>
                        <thead>
                        <tr>
                            <th>Name</th>
                            <th>Course</th>
                            <th>Lat</th>
                            <th>Lon</th>
                        </tr>
                        </thead>
                        <tbody>
                        { this.props.entities.map((val,index) => {
                            return (
                                <tr key={index}>
                                    <td>{val.Name}</td>
                                    <td>{val.Course}</td>
                                    <td>{val.position[0]}</td>
                                    <td>{val.position[1]}</td>

                                </tr>
                            )
                        })}
                        </tbody>
                    </table>
                </div>
        );
    }

}

export default Tracklist;

