 
   onRemoveLogo: ->
 
-    team = @state.team.updateIn(['customize', 'logo'], -> '')
-    @setState {team}
+    dataToUpdate =
+      customize:
+        logo: @state.logopath
+    @updateTeam { dataToUpdate }
 
 
   onUpdate: ->
 
-    dataToUpdate =
-      customize:
-        logo: @state.logopath
-
+    dataToUpdate = {}
     title = @state.teamName
 
     if title isnt @state.team.get 'title'
       dataToUpdate.title = title
 
-    name = @state.fileName
-    content = @state.file
-    mimeType = @state.fileType
+    return  unless dataToUpdate.title
 
-      if not (name or content or mimeType)
-        return
-
-    TeamFlux.actions.uploads3({ name, content, mimeType }).then ({ url }) ->
-      dataToUpdate.customize.logo = url
-      updateTeam { dataToUpdate }
-    .catch ({ err }) ->
-      showError err  if err
-      updateTeam { dataToUpdate }
+    @updateTeam { dataToUpdate }
 
 
-  onTeamNameChanged: (event)->
+  updateTeam: ({ dataToUpdate }) ->
+
+    TeamFlux.actions.updateTeam(dataToUpdate).then ({ message }) =>
+      notify message
+      @setState { loading: no }
+    .catch ({ message }) =>
+      notify message
+      @setState { loading: no }
+
+
+  onTeamNameChanged: (event) ->
 
     @setState
       teamName : event.target.value

      team={@state.team}
      teamName={@state.teamName}
      canEdit={@state.canEdit}
      logopath={@state.logopath}
      onUploadInput={@bound 'onUploadInput'}
      onClickLogo={@bound 'onClickLogo'}

kd              = require 'kd'
React           = require 'kd-react'
TeamFlux        = require 'app/flux/teams'
