     @context.router.transitionTo('/dashboard')
 
   render: ->
-    Component = STAGES[ STAGE_KEYS[ @state.currentStage ] ]
+    Component = componentFor(@state.currentStage)
     <div className="new-course">
       <BS.Panel
         header={Component.title}

  'course_code': require './select-course'
  'period':      require './select-dates'
  'details':     require './course-details'
  'build':       require './build-course'
}

STAGE_KEYS = keys(STAGES)

NewCourse = React.createClass


  mixins: [BindStore]
  bindStore: NewCourseStore

  onContinue: -> @go(1)
  onBack: -> @go(-1)
  go: (amt) ->
    stage = @state.currentStage
    while componentFor(stage + amt)?.shouldSkip?()
      stage += amt
    @setState({currentStage: stage + amt})

  Footer: ->
    <div className="controls">
