 
 {Task} = require '../task'
 {Navigation} = require './navigation'
+CourseRegistration = require '../course/registration'
 UserLoginButton = require '../user/login-button'
 UserLogin = require '../user/login'
+UserProfile = require '../user/profile'
 
 {ExerciseStep} = require '../exercise'
 {Dashboard} = require '../dashboard'
 
-CourseRegistration = require '../course/registration'
+
 User = require '../user/model'
 
 {channel} = require './model'

    {view} = eventData
    @setState({view}) if view?

  getUserState: ->
    course = User.getCourse(@props.collectionUUID)


      course = User.getCourse(@props.collectionUUID)

      if view is 'task'
        <Task {...@props} key='task'/>
      else if view is 'dashboard'
        <Dashboard id={course.id}/>
      else if view is 'profile'
        <UserProfile onComplete={@showTasks} />
      else
        <h3 className="error">bad internal state, no view is set</h3>

  render: ->
    {isLoaded, isLoggedIn} = @state
