<commit_before>import React from "react";
import ReactDOM from "react-dom";
import Immutable from "immutable";
import AccountsList from "./AccountsList";
import RecentTransactions from "../Account/RecentTransactions";
import Translate from "react-translate-component";
import Proposals from "components/Account/Proposals";
import ps from "perfect-scrollbar";

class Dashboard extends React.Component {

    constructor() {
        super();
        this.state = {width: null};
        this._setWidth = this._setWidth.bind(this);
    }


    componentDidMount() {
        let c = ReactDOM.findDOMNode(this.refs.container);
        ps.initialize(c);
        let t = ReactDOM.findDOMNode(this.refs.transactions);
        ps.initialize(t);
    }

    componentDidUpdate() {
        let c = ReactDOM.findDOMNode(this.refs.container);
        ps.update(c);
        let t = ReactDOM.findDOMNode(this.refs.transactions);
        ps.update(t);        
    }

    componentDidMount() {
        this._setWidth();

        window.addEventListener("resize", this._setWidth, false);
    }

    componentWillUnMount() {
        window.removeEventListener("resize", this._setWidth, false);
    }

    _setWidth() {
        let width = window.innerWidth;
        if (width !== this.state.width) {
            this.setState({width});
        }
    }

    render() {
        let {width} = this.state;
        let names = this.props.linkedAccounts.toArray().sort();

        let outerClass = "grid-block page-layout no-overflow " + (width < 750 ? "vertical" : "horizontal");
        let firstDiv = "grid-block no-overflow " + (width < 750 ? "" : "shrink");
        return (
            <div className={outerClass}>
                <div className={firstDiv}>
                    <div ref="container" className="grid-content" style={{paddingLeft: "0.25rem", paddingRight: "0.25rem"}}>
                        <h4 style={{paddingLeft: "1rem"}}><Translate content="account.overview" /></h4>
                        <AccountsList accounts={Immutable.List(names)} width={width} />
                    </div>
                </div>
                <div className="grid-block right-column no-overflow">
                    <div ref="transactions" className="grid-content" style={{paddingLeft: "0.5rem", paddingRight: "0.25rem"}}>
                        <h4 style={{paddingLeft: "1rem"}}><Translate content="account.recent" /></h4>
                        <RecentTransactions accountsList={this.props.linkedAccounts} limit={25} compactView={true}/>
                    </div>
                </div><commit_msg>Fix typo in Dashboard.jsx<commit_after>import React from "react";
import ReactDOM from "react-dom";
import Immutable from "immutable";
import AccountsList from "./AccountsList";
import RecentTransactions from "../Account/RecentTransactions";
import Translate from "react-translate-component";
import Proposals from "components/Account/Proposals";
import ps from "perfect-scrollbar";

class Dashboard extends React.Component {

    constructor() {
        super();
        this.state = {width: null};
        this._setWidth = this._setWidth.bind(this);
    }


    componentDidMount() {
        let c = ReactDOM.findDOMNode(this.refs.container);
        ps.initialize(c);
        let t = ReactDOM.findDOMNode(this.refs.transactions);
        ps.initialize(t);
    }

    componentDidUpdate() {
        let c = ReactDOM.findDOMNode(this.refs.container);
        ps.update(c);
        let t = ReactDOM.findDOMNode(this.refs.transactions);
        ps.update(t);        
    }

    componentDidMount() {
        this._setWidth();

        window.addEventListener("resize", this._setWidth, false);
    }

    componentWillUnmount() {
        window.removeEventListener("resize", this._setWidth, false);
    }

    _setWidth() {
        let width = window.innerWidth;
        if (width !== this.state.width) {
            this.setState({width});
        }
    }

    render() {
        let {width} = this.state;
        let names = this.props.linkedAccounts.toArray().sort();

        let outerClass = "grid-block page-layout no-overflow " + (width < 750 ? "vertical" : "horizontal");
        let firstDiv = "grid-block no-overflow " + (width < 750 ? "" : "shrink");
        return (
            <div className={outerClass}>
                <div className={firstDiv}>
                    <div ref="container" className="grid-content" style={{paddingLeft: "0.25rem", paddingRight: "0.25rem"}}>
                        <h4 style={{paddingLeft: "1rem"}}><Translate content="account.overview" /></h4>
                        <AccountsList accounts={Immutable.List(names)} width={width} />
                    </div>
                </div>
                <div className="grid-block right-column no-overflow">
                    <div ref="transactions" className="grid-content" style={{paddingLeft: "0.5rem", paddingRight: "0.25rem"}}>
                        <h4 style={{paddingLeft: "1rem"}}><Translate content="account.recent" /></h4>
                        <RecentTransactions accountsList={this.props.linkedAccounts} limit={25} compactView={true}/>
                    </div>
                </div>
{'fraction_non_alphanumeric': 0.13896405102435253, 'fraction_numerical': 0.009663703131039814, 'mean_word_length': 2.3408650742414463, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 37, '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': '4321700', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1413, 'n_words': 292}