<commit_before>import React from 'react'
import R from 'ramda'

import TrendLine from 'components/TrendLine'
import { uid } from 'utils'

import {
  Wrapper,
  MenuRow,
  MenuItemBar,
  MenuItemIcon,
  MenuItemTitle,
  MiniChartWrapper,
} from './styles/menu_bar'

import { onCommunitySelect } from './logic'

const MenuBar = ({ pin, item, activeRaw, forceRerender }) => (
  <Wrapper onClick={onCommunitySelect.bind(this, item)}>
    <MenuItemBar>
      <MenuRow pin={pin} active={activeRaw === R.toLower(item.raw)}>
        <MenuItemIcon
          key={uid.gen()}
          active={activeRaw === R.toLower(item.raw)}
          raw={item.raw}
          src={item.logo}
        />
        {/* eslint-disable jsx-a11y/anchor-is-valid */}
        <MenuItemTitle
          pin={pin}
          active={activeRaw === R.toLower(item.raw)}
          forceRerender={forceRerender}
        >
          {item.title}
        </MenuItemTitle>

        <MiniChartWrapper pin={pin}>
          <TrendLine
            data={item.contributesDigest}
            duration={300}
            radius={15}
            width={7}
          />
        </MiniChartWrapper>
      </MenuRow>
    </MenuItemBar>
  </Wrapper>
)

export default MenuBar<commit_msg>fix(sidebar): add key to trendline to force render<commit_after>import React from 'react'
import R from 'ramda'

import TrendLine from 'components/TrendLine'
import { uid } from 'utils'

import {
  Wrapper,
  MenuRow,
  MenuItemBar,
  MenuItemIcon,
  MenuItemTitle,
  MiniChartWrapper,
} from './styles/menu_bar'

import { onCommunitySelect } from './logic'

const MenuBar = ({ pin, item, activeRaw, forceRerender }) => (
  <Wrapper onClick={onCommunitySelect.bind(this, item)}>
    <MenuItemBar>
      <MenuRow pin={pin} active={activeRaw === R.toLower(item.raw)}>
        <MenuItemIcon
          key={uid.gen()}
          active={activeRaw === R.toLower(item.raw)}
          raw={item.raw}
          src={item.logo}
        />
        {/* eslint-disable jsx-a11y/anchor-is-valid */}
        <MenuItemTitle
          pin={pin}
          active={activeRaw === R.toLower(item.raw)}
          forceRerender={forceRerender}
        >
          {item.title}
        </MenuItemTitle>

        <MiniChartWrapper pin={pin}>
          <TrendLine
            key={uid.gen()}
            data={item.contributesDigest}
            duration={300}
            radius={15}
            width={7}
          />
        </MiniChartWrapper>
      </MenuRow>
    </MenuItemBar>
  </Wrapper>
)

export default MenuBar
{'fraction_non_alphanumeric': 0.13494261970716265, 'fraction_numerical': 0.006331618519984171, 'mean_word_length': 2.2577319587628866, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, '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': '1336114', 'n_tokens_mistral': 796, 'n_tokens_neox': 770, 'n_words': 151}