<commit_before>'use strict'

import React from 'react'
import {connect} from 'react-redux'

import Header from '../components/header'
import Footer from '../components/footer'
import Sidebar from '../components/sidebar'

import {toggleSidebar} from '../actions/sidebar'

export const Shell = React.createClass({
  handleToggle (event) {
    event.preventDefault()
    this.props.dispatch(toggleSidebar())
  },

  render () {
    const handleToggle = this.handleToggle
    const {children, isLoggedIn, isExpanded} = this.props

    var styleClass = 'page-wrapper'
    if (isExpanded) styleClass = `${styleClass}-expanded`

    return (
      <div className="shell">
        <Header showProfile={isLoggedIn} />

        <div className={styleClass}>
          <Sidebar isExpanded={isExpanded} onToggle={handleToggle} />
          {children}
        </div>

        <Footer />
      </div>
    )
  }<commit_msg>Updated shell to account for sidebar on login<commit_after>'use strict'

import React from 'react'
import {connect} from 'react-redux'

import Header from '../components/header'
import Footer from '../components/footer'
import Sidebar from '../components/sidebar'

import {toggleSidebar} from '../actions/sidebar'

export const Shell = React.createClass({
  handleToggle (event) {
    event.preventDefault()
    this.props.dispatch(toggleSidebar())
  },

  render () {
    const handleToggle = this.handleToggle
    const {children, isLoggedIn, isExpanded} = this.props

    var styleClass = 'page-wrapper'
    if (isLoggedIn & isExpanded) styleClass = `${styleClass}-expanded`

    let sidebar = null
    if (isLoggedIn) {
      sidebar = <Sidebar isExpanded={isExpanded} onToggle={handleToggle} />
    }


    return (
      <div className="shell">
        <Header showProfile={isLoggedIn} />

        <div className={styleClass}>
          {sidebar}
          {children}
        </div>

        <Footer />
      </div>
    )
  }
{'fraction_non_alphanumeric': 0.12745098039215685, 'fraction_numerical': 0.0, 'mean_word_length': 3.0144927536231885, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7628346', 'n_tokens_mistral': 572, 'n_tokens_neox': 559, 'n_words': 143}