       daily: 'Daily Zooniverse'
       blog: 'Blog'
 
+AdminToggle = React.createClass
+  getInitialState: ->
+    checked: false
+
+  componentDidMount: ->
+    apiClient.listen 'change', @handleClientChange
+
+  componentWillUnmount: ->
+    apiClient.stopListening 'change', @handleClientChange
+
+  handleClientChange: ->
+    checked = apiClient.params.admin ? false
+    unless @state.checked is checked
+      @setState {checked}
+
+  render: ->
+    <label>
+      <input type="checkbox" checked={@state.checked} onChange={@toggleAdminMode} />{' '}
+      <Translate content="footer.adminMode" />
+    </label>
+
+  toggleAdminMode: (e) ->
+    apiClient.update 'params.admin': if e.target.checked
+      true
+    else
+      undefined
+
 module.exports = React.createClass
   displayName: 'MainFooter'
 

          </Link>
          <br />
          {if @state.user?.admin or @state.user?.id is '3' # brian-testing
            <label>
              <input type="checkbox" checked={apiClient.params.admin} onChange={@toggleAdminMode} />{' '}
              <Translate content="footer.adminMode" />
            </label>}
        </div>
        <nav className="site-map">
          <div className="site-map-section">


  componentDidMount: ->
    auth.listen 'change', @handleAuthChange
    @handleAuthChange()

  componentWillUnmount: ->
    auth.stopListening 'change', @handleAuthChange

  handleAuthChange: ->
    auth.checkCurrent().then (user) =>
      @setState {user}

  render: ->
    <footer className="main-footer">
