<commit_before>import React, { Component } from "react";
import { Link } from "react-router-dom";
import {
  DASHBOARD_INDEX_URL,
  DASHBOARD_SLEEP_ANALYTICS_URL,
  DASHBOARD_SUPPLEMENTS_EVENTS_LOGS_URL,
  DASHBOARD_HEART_RATE_LOGS_URL,
  DASHBOARD_SUPPLEMENTS_URL,
  DASHBOARD_PRODUCTIVITY_LOGS_URL,
  DASHBOARD_USER_ACTIVITIES_EVENTS_LOGS_URL,
  DASHBOARD_USER_ACTIVITIES_URL,
  DASHBOARD_SLEEP_LOGS_URL,
  DASHBOARD_PRODUCTIVITY_ANALYTICS_URL,
  EXPORT_ALL_DATA_URL,
  DASHBOARD_DAILY_OVERVIEW_ANALYTICS_URL
} from "../constants/urls";

const DashboardButton = () => (
  <li className="nav-item">
    <Link to={DASHBOARD_INDEX_URL} className="nav-link">
      <i className="icon-speedometer" />
      Dashboard
      <NewStatus />
    </Link>
  </li>
);

const NewStatus = () => <span className="badge badge-info">NEW</span>;

const NavigationTitle = props => (
  <li className="nav-title">
    {props.title}
  </li>
);

const NavigationLink = props => (
  <li className="nav-item">
    <Link className="nav-link" to={props.link}>
      <i className={props.iconName} /> {props.label}
    </Link>
  </li>
);

const DataSourcesMenu = props => (
  <div>
    <NavigationTitle title="Data Sources" />
    <DataSourcesMenuLinks />
  </div>
);

const DataSourcesMenuLinks = () => (
  <div>
    <NavigationLink
      iconName="icon-calendar"
      label="Text Reminders"
      link={DASHBOARD_SUPPLEMENTS_URL}
    />
    <NavigationLink
      iconName="icon-list"
      label="Activity Types"
      link={DASHBOARD_USER_ACTIVITIES_URL}
    />
    <NavigationLink
      iconName="icon-list"
      label="Supplements"
      link={DASHBOARD_SUPPLEMENTS_URL}
    />
    {/*<NavigationLink*/}
    {/*iconName="icon-rocket"*/}
    {/*label="FitBit"*/}
    {/*link={DASHBOARD_CHARTS_URL}*/}
    {/*/>*/}
    {/*<NavigationLink*/}
    {/*iconName="icon-social-github"*/}
    {/*label="GitHub"*/}
    {/*link={DASHBOARD_CHARTS_URL}*/}
    {/*/>*/}
    {/*<NavigationLink*/}
    {/*iconName="icon-target"*/}
    {/*label="RescueTime"*/}
    {/*link={DASHBOARD_CHARTS_URL}*/}
    {/*/>*/}
  </div>
);

const ExportSidebar = () => (
  <div>
    <NavigationTitle title="Export Data" />
    <NavigationLink
      iconName="icon-cloud-download"
      label="All Data"
      link={EXPORT_ALL_DATA_URL}
    />
  </div>
);

class Sidebar extends Component {
  handleClick(e) {
    e.preventDefault();
    e.target.parentElement.classList.toggle("open");
  }

  render() {
    return (
      <nav className="sidebar sidebar-nav">
        <ul className="nav">
          {/*<DashboardButton />*/}
          <NavigationTitle title="Log" />
          <NavigationLink
            iconName="icon-chemistry"
            label="Supplements"
            link={DASHBOARD_SUPPLEMENTS_EVENTS_LOGS_URL}
          />
          <NavigationLink
            iconName="icon-note"
            label="Events"
            link={DASHBOARD_USER_ACTIVITIES_EVENTS_LOGS_URL}
          />
          {/*<NavigationLink*/}
          {/*iconName="icon-heart"*/}
          {/*label="Heart Rate"*/}
          {/*link={DASHBOARD_HEART_RATE_LOGS_URL}*/}
          {/*/>*/}
          <NavigationLink
            iconName="icon-graph"
            label="Productivity"
            link={DASHBOARD_PRODUCTIVITY_LOGS_URL}
          />
          <NavigationLink
            iconName="icon-volume-off"
            label="Sleep"
            link={DASHBOARD_SLEEP_LOGS_URL}
          />
          <li className="divider" />
          <NavigationTitle title="Analytics" />
          <NavigationLink
            iconName="icon-chart"
            label="Sleep"
            link={DASHBOARD_SLEEP_ANALYTICS_URL}
          />
          <NavigationLink
            iconName="icon-speedometer"
            label="Productivity"
            link={DASHBOARD_PRODUCTIVITY_ANALYTICS_URL}
          />
          <NavigationLink
            iconName="icon-clock"
            label="Daily Overview"
            link={DASHBOARD_DAILY_OVERVIEW_ANALYTICS_URL}
          />
          <li className="divider" />
          <DataSourcesMenu onClick={this.handleClick.bind(this)} />
          <li className="divider" />
          <ExportSidebar />

        </ul>
      </nav>
    );
  }
}

export default Sidebar;
<commit_msg>Remove this for now<commit_after>import React, { Component } from "react";
import { Link } from "react-router-dom";
import {
  DASHBOARD_INDEX_URL,
  DASHBOARD_SLEEP_ANALYTICS_URL,
  DASHBOARD_SUPPLEMENTS_EVENTS_LOGS_URL,
  DASHBOARD_HEART_RATE_LOGS_URL,
  DASHBOARD_SUPPLEMENTS_URL,
  DASHBOARD_PRODUCTIVITY_LOGS_URL,
  DASHBOARD_USER_ACTIVITIES_EVENTS_LOGS_URL,
  DASHBOARD_USER_ACTIVITIES_URL,
  DASHBOARD_SLEEP_LOGS_URL,
  DASHBOARD_PRODUCTIVITY_ANALYTICS_URL,
  EXPORT_ALL_DATA_URL,
  DASHBOARD_DAILY_OVERVIEW_ANALYTICS_URL
} from "../constants/urls";

const DashboardButton = () => (
  <li className="nav-item">
    <Link to={DASHBOARD_INDEX_URL} className="nav-link">
      <i className="icon-speedometer" />
      Dashboard
      <NewStatus />
    </Link>
  </li>
);

const NewStatus = () => <span className="badge badge-info">NEW</span>;

const NavigationTitle = props => (
  <li className="nav-title">
    {props.title}
  </li>
);

const NavigationLink = props => (
  <li className="nav-item">
    <Link className="nav-link" to={props.link}>
      <i className={props.iconName} /> {props.label}
    </Link>
  </li>
);

const DataSourcesMenu = props => (
  <div>
    <NavigationTitle title="Data Sources" />
    <DataSourcesMenuLinks />
  </div>
);

const DataSourcesMenuLinks = () => (
  <div>
    {/*<NavigationLink*/}
    {/*iconName="icon-calendar"*/}
    {/*label="Text Reminders"*/}
    {/*link={DASHBOARD_SUPPLEMENTS_URL}*/}
    {/*/>*/}
    <NavigationLink
      iconName="icon-list"
      label="Activity Types"
      link={DASHBOARD_USER_ACTIVITIES_URL}
    />
    <NavigationLink
      iconName="icon-list"
      label="Supplements"
      link={DASHBOARD_SUPPLEMENTS_URL}
    />
    {/*<NavigationLink*/}
    {/*iconName="icon-rocket"*/}
    {/*label="FitBit"*/}
    {/*link={DASHBOARD_CHARTS_URL}*/}
    {/*/>*/}
    {/*<NavigationLink*/}
    {/*iconName="icon-social-github"*/}
    {/*label="GitHub"*/}
    {/*link={DASHBOARD_CHARTS_URL}*/}
    {/*/>*/}
    {/*<NavigationLink*/}
    {/*iconName="icon-target"*/}
    {/*label="RescueTime"*/}
    {/*link={DASHBOARD_CHARTS_URL}*/}
    {/*/>*/}
  </div>
);

const ExportSidebar = () => (
  <div>
    <NavigationTitle title="Export Data" />
    <NavigationLink
      iconName="icon-cloud-download"
      label="All Data"
      link={EXPORT_ALL_DATA_URL}
    />
  </div>
);

class Sidebar extends Component {
  handleClick(e) {
    e.preventDefault();
    e.target.parentElement.classList.toggle("open");
  }

  render() {
    return (
      <nav className="sidebar sidebar-nav">
        <ul className="nav">
          {/*<DashboardButton />*/}
          <NavigationTitle title="Log" />
          <NavigationLink
            iconName="icon-chemistry"
            label="Supplements"
            link={DASHBOARD_SUPPLEMENTS_EVENTS_LOGS_URL}
          />
          <NavigationLink
            iconName="icon-note"
            label="Events"
            link={DASHBOARD_USER_ACTIVITIES_EVENTS_LOGS_URL}
          />
          {/*<NavigationLink*/}
          {/*iconName="icon-heart"*/}
          {/*label="Heart Rate"*/}
          {/*link={DASHBOARD_HEART_RATE_LOGS_URL}*/}
          {/*/>*/}
          <NavigationLink
            iconName="icon-graph"
            label="Productivity"
            link={DASHBOARD_PRODUCTIVITY_LOGS_URL}
          />
          <NavigationLink
            iconName="icon-volume-off"
            label="Sleep"
            link={DASHBOARD_SLEEP_LOGS_URL}
          />
          <li className="divider" />
          <NavigationTitle title="Analytics" />
          <NavigationLink
            iconName="icon-chart"
            label="Sleep"
            link={DASHBOARD_SLEEP_ANALYTICS_URL}
          />
          <NavigationLink
            iconName="icon-speedometer"
            label="Productivity"
            link={DASHBOARD_PRODUCTIVITY_ANALYTICS_URL}
          />
          <NavigationLink
            iconName="icon-clock"
            label="Daily Overview"
            link={DASHBOARD_DAILY_OVERVIEW_ANALYTICS_URL}
          />
          <li className="divider" />
          <DataSourcesMenu onClick={this.handleClick.bind(this)} />
          <li className="divider" />
          <ExportSidebar />

        </ul>
      </nav>
    );
  }
}

export default Sidebar;

{'fraction_non_alphanumeric': 0.14749470712773466, 'fraction_numerical': 0.0, 'mean_word_length': 2.44251012145749, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7529629', 'n_tokens_mistral': 2959, 'n_tokens_neox': 2911, 'n_words': 363}