<commit_before>// @flow
import React, { Component } from 'react'
import { Link } from 'react-router'

import s from './Sidebar.scss'

export default class Sidebar extends Component {
  constructor (props) {
    super(props)

    this.state = {
      links: [
        { text: 'Dashboard', to: '/admin/dashboard' },
        { text: 'Entries', to: '/admin/entries' },
        { text: 'Globals', to: '/admin/globals' },
        { text: 'Categories', to: '/admin/categories' },
        { text: 'Assets', to: '/admin/assets' },
        { text: 'Settings', to: '/admin/settings' }
      ]
    }
  }

  renderLink (link) {
    return (
      <li>
        <Link className={s.link}
          activeClassName={s.activeLink}
          to={link.to}>
          {link.text}
        </Link>
      </li>
    )
  }

  render () {
    return (
      <header className={s.root}>
        <nav className={s.nav}>
          <ul>
            {this.state.links.map(this.renderLink)}
          </ul>
        </nav>
      </header>
    )
  }
}
<commit_msg>Add key to sidebar links<commit_after>// @flow
import React, { Component } from 'react'
import { Link } from 'react-router'

import s from './Sidebar.scss'

export default class Sidebar extends Component {
  constructor (props) {
    super(props)

    this.state = {
      links: [
        { text: 'Dashboard', to: '/admin/dashboard' },
        { text: 'Entries', to: '/admin/entries' },
        { text: 'Globals', to: '/admin/globals' },
        { text: 'Categories', to: '/admin/categories' },
        { text: 'Assets', to: '/admin/assets' },
        { text: 'Settings', to: '/admin/settings' }
      ]
    }
  }

  renderLink (link, index) {
    return (
      <li key={index}>
        <Link className={s.link}
          activeClassName={s.activeLink}
          to={link.to}>
          {link.text}
        </Link>
      </li>
    )
  }

  render () {
    return (
      <header className={s.root}>
        <nav className={s.nav}>
          <ul>
            {this.state.links.map(this.renderLink)}
          </ul>
        </nav>
      </header>
    )
  }
}

{'fraction_non_alphanumeric': 0.16954022988505746, 'fraction_numerical': 0.0, 'mean_word_length': 1.849931787175989, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '809746', 'n_tokens_mistral': 683, 'n_tokens_neox': 677, 'n_words': 150}