<commit_before>import React, { Component } from 'react';
import filtersIcon from '../icons/filtersIcon.svg';
import effectsIcon from '../icons/effectsIcon.svg';
import MenuItemIconAbove from './MenuItemIconAbove';
import Toolbar from './Toolbar';


class MainNavbar extends Component {
  constructor(props) {
   super(props);

   this.state = {currentItem: "Effects"};
 }

  render() {
    const menuItems = [
      {
       icon: effectsIcon,
       alt: "effects",
       label: "Effects",
       disabled: false
     },
     {
      icon: filtersIcon,
      alt: "filters",
      label: "Filters",
      disabled: true
      }
    ];

    const menu = menuItems.map((item) => {
      return <MenuItemIconAbove
                        className={item.disabled?"menu-item-disabled": "menu-item-active"}
                        icon={item.icon} alt={item.alt}
                        label={item.label} currentItem={this.state.currentItem}
                        key={item.label}
                        onClick={(e) => this.activateMenu.bind(this, e, item)}/>
    });

    return (
      <div>
        <div className="middle navbar-container">
          {menu}
        </div>
        <Toolbar canvas={this.props.canvas} active={this.state.currentItem}/>
      </div>
    );
  }

  activateMenu(e, item) {
    if (!item.disabled) {
      this.setState({currentItem: item.label});
    }
  }
<commit_msg>FIX toolbar not activating on topbar menu click<commit_after>import React, { Component } from 'react';
import filtersIcon from '../icons/filtersIcon.svg';
import effectsIcon from '../icons/effectsIcon.svg';
import MenuItemIconAbove from './MenuItemIconAbove';
import Toolbar from './Toolbar';


class MainNavbar extends Component {
  constructor(props) {
   super(props);

   this.state = {currentItem: "Effects"};
 }

  render() {
    const menuItems = [
      {
       icon: effectsIcon,
       alt: "effects",
       label: "Effects",
       disabled: false
     },
     {
      icon: filtersIcon,
      alt: "filters",
      label: "Filters",
      disabled: false
      }
    ];

    const menu = menuItems.map((item) => {
      return <MenuItemIconAbove
                        className={item.disabled?"menu-item-disabled": "menu-item-active"}
                        icon={item.icon} alt={item.alt}
                        label={item.label} currentItem={this.state.currentItem}
                        key={item.label}
                        onClick={(e) => this.activateMenu(e, item)}/>
    });

    return (
      <div>
        <div className="middle navbar-container">
          {menu}
        </div>
        <Toolbar canvas={this.props.canvas} active={this.state.currentItem}/>
      </div>
    );
  }

  activateMenu(e, item) {
    if (!item.disabled) {
      this.setState({currentItem: item.label});
    }
  }

{'fraction_non_alphanumeric': 0.13992932862190813, 'fraction_numerical': 0.0, 'mean_word_length': 2.0771739130434783, 'pattern_counts': {'":': 2, '<': 15, '<?xml version=': 0, '>': 19, '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': '2202134', 'n_tokens_mistral': 821, 'n_tokens_neox': 794, 'n_words': 170}