 React = require 'react'
-{Link} = require 'react-router'
+{Link, Navigation} = require 'react-router'
 PromiseRenderer = require '../../components/promise-renderer'
 LoadingIndicator = require '../../components/loading-indicator'
 apiClient = require '../../api/client'


module.exports = React.createClass
  displayName: 'LabIndex'

  getInitialState: ->
    projects: []

      .catch (error) =>
        @setState creationError: error
      .then sleep 1100 # Wait for the global request cache to clear (TODO: Cache should really expire on return).
      .then (project) =>
        # TODO: user.uncacheLink 'project'
        @setState creationInProgress: false
        @transitionTo 'edit-project-details', projectID: project.id
