 
 module.exports = React.createClass
   displayName: 'DataExportButton'
+
+  getDefaultProps: ->
+    contentType: 'text/csv'
 
   getInitialState: ->
     exportRequested: false

      <small className="form-help">
        CSV format.{' '}
        <PromiseRenderer promise={@exportGet()}>{([mostRecent]) =>
          if mostRecent?
            <span>
              Most recent data available requested{' '}
              <a href={mostRecent.src}>{moment(mostRecent.updated_at).fromNow()}</a>.
            </span>
          else
            <span>Never requested.</span>


  requestDataExport: ->
    @setState exportError: null
    apiClient.post @props.project._getURL(@props.exportType), media: content_type: @props.contentType
      .then =>
        @_exportsGet = null
        @setState exportRequested: true
      .catch (error) =>
        @setState exportError: error

  recentAndReady: (exported) ->
    exported? and (exported.metadata.state is 'ready' or not exported.metadata.state?)

  pending: (exported) ->
    exported?

  render: ->
    <div>
