     background: null
     avatar: null
     pages: []
+    selectedWorkflow: null
 
   componentDidMount: ->
     document.documentElement.classList.add 'on-project-page'
     @fetchInfo @props.project
+    @getSelectedWorkflow @props.project, @props.preferences
     @updateSugarSubscription @props.project
 
   componentWillUnmount: ->


  render: ->
    projectPath = "/projects/#{@props.project.slug}"

    currentWorkflow = @props.preferences?.preferences.selected_workflow ? @props.project.configuration?.default_workflow

    pages = [{}, @state.pages...].reduce (map, page) =>
      map[page.url_key] = page

  componentWillReceiveProps: (nextProps) ->
    if nextProps.project isnt @props.project
      @fetchInfo nextProps.project
      @getSelectedWorkflow nextProps.project, nextProps.preferences
      @updateSugarSubscription nextProps.project
    else if nextProps.preferences?.preferences.selected_workflow isnt @state.selectedWorkflow?.id
      @getSelectedWorkflow nextProps.project, nextProps.preferences

  fetchInfo: (project) ->
    @setState
