context = window
rest = context.JK.Rest()


@JamTrackCSVLink = React.createClass({

  render: () ->
    `<a href="https://s3.amazonaws.com/jamkazam-public/public/lists/all-jamkazam-jamtracks.csv" onClick={this.csvClick}>as a CSV file</a>`

  csvClick: (e) ->
    window.JK.GA.trackFileDownload(window.JK.GA.FileDownloadTypes.jamtrack_csv);

    window.JK.popExternalLink($(e.target).attr('href'))
    e.preventDefault()
})