import InfoData from './InfoData.coffee'

export default class InfoEx extends Component
  onSubmit: (title, url, callback) =>
    Meteor.call 'links.insert',
      title: title,
      url: url
    , (error) =>
      if error?
        alert error.reason

        return

      callback()

  render: =>
    <InfoData {...this.props} onSubmit={@onSubmit} />
