 AppComponent = React.createClass
   displayName: 'AppComponent'
   render: ->
+    if @props.bodyWrapper
+      body = @props.bodyWrapper null, @props.activeRouteHandler()
+    else
+      body = @props.activeRouteHandler()
     React.DOM.div {className: 'lead'},
       React.DOM.div {className: 'nav-bar'},
         Router.Link {to: 'notebook', className: 'title'}, 'lead'


  null_route = (fn) -> React.createClass render: -> fn.call(@); null

  routes = Routes null,
    Route {handler: AppComponent},
      Route {path: '/', name: 'default', handler: null_route ->
        if raw_cell_value?
          Router.replaceWith '/notebook/raw/' + raw_cell_value

          Router.Link {to: 'help-index'}, React.DOM.i {className: 'fa fa-question-circle'}
          Router.Link {to: 'settings'}, React.DOM.i {className: 'fa fa-cog'}
      React.DOM.div {className: 'body'},
        body

HelpPathComponent = React.createClass
  displayName: 'HelpPathComponent'
