<commit_before>import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'


class ItemList extends Component {

    render() {
        let { match, items } = this.props;
        let itemsList = items.map((item) => {
            return (
                <li key={item.id} className="list-group-item">
                    <Link to={`/games/${match.params.gameId}/items/${item.id}`}>{item.name}</Link>
                </li>
            )
        })
        return (
            <div>
                <Link className="character-new" to={`/games/${match.params.gameId}/items/new`}>
                    <button className="btn btn-primary">
                        Dodaj postać
                </button>
                </Link>
                <ul className="items-list list-group">
                    {itemsList}
                </ul>
            </div>
        );
    }
}

function mapStateToProps(state, ownProps) {
    const gameId = ownProps.match.params.gameId;<commit_msg>add a way to add items to a game, no images yet<commit_after>import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'


class ItemList extends Component {

    render() {
        let { match, items } = this.props;
        let itemsList = items.map((item) => {
            return (
                <li key={item.id} className="list-group-item">
                    <Link to={`/games/${match.params.gameId}/items/${item.id}`}>{item.name}</Link>
                </li>
            )
        })
        return (
            <div>
                <Link className="character-new" to={`/games/${match.params.gameId}/items/new`}>
                    <button className="btn btn-primary">
                        Dodaj przedmiot
                </button>
                </Link>
                <ul className="items-list list-group">
                    {itemsList}
                </ul>
            </div>
        );
    }
}

function mapStateToProps(state, ownProps) {
    const gameId = ownProps.match.params.gameId;
{'fraction_non_alphanumeric': 0.13742272943414172, 'fraction_numerical': 0.0, 'mean_word_length': 1.5107398568019093, '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': '5607547', 'n_tokens_mistral': 601, 'n_tokens_neox': 580, 'n_words': 122}