<commit_before>import React from 'react';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';

import {toggleBacklog, toggleUserMenu, toggleLog} from '../actions';

const TopBar = ({roomId, username, toggleBacklog, toggleUserMenu, toggleLog}) => {
  return (
    <div className="top-bar">
      <div className="poinz-logo">PoinZ</div>
      <a className="backlog-toggle clickable" onClick={toggleBacklog}>
        <span className="menu-link-inner">
          <span></span>
        </span>
      </a>

      <span className="quick-menu">
        <span className="whoami">{username + '@' + roomId}</span>
      </span>

      <a className="user-menu-toggle clickable" onClick={toggleUserMenu}>
        <i className="fa fa-cog"></i>
      </a>
      <a className="log-toggle clickable" onClick={toggleLog}>
        <i className="fa fa-list"></i>
      </a>

    </div>
  );
};

TopBar.propTypes = {
  roomId: PropTypes.string,
  username: PropTypes.string,
  toggleBacklog: PropTypes.func,
  toggleUserMenu: PropTypes.func,
  toggleLog: PropTypes.func
};

export default connect(
  state => ({
    roomId: state.roomId,
    username: state.users[state.userId] ? state.users[state.userId].username : '-'
  }),
 {toggleBacklog, toggleUserMenu, toggleLog}
)(TopBar);

<commit_msg>fix bug when reloading page on special view poinzstatus<commit_after>import React from 'react';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';

import {toggleBacklog, toggleUserMenu, toggleLog} from '../actions';

const TopBar = ({roomId, username, toggleBacklog, toggleUserMenu, toggleLog}) => {
  return (
    <div className="top-bar">
      <div className="poinz-logo">PoinZ</div>
      <a className="backlog-toggle clickable" onClick={toggleBacklog}>
        <span className="menu-link-inner">
          <span></span>
        </span>
      </a>

      <span className="quick-menu">
        <span className="whoami">{username + '@' + roomId}</span>
      </span>

      <a className="user-menu-toggle clickable" onClick={toggleUserMenu}>
        <i className="fa fa-cog"></i>
      </a>
      <a className="log-toggle clickable" onClick={toggleLog}>
        <i className="fa fa-list"></i>
      </a>

    </div>
  );
};

TopBar.propTypes = {
  roomId: PropTypes.string,
  username: PropTypes.string,
  toggleBacklog: PropTypes.func,
  toggleUserMenu: PropTypes.func,
  toggleLog: PropTypes.func
};

export default connect(
  state => ({
    roomId: state.roomId,
    username: (state.users && state.users[state.userId] ) ? state.users[state.userId].username : '-'
  }),
 {toggleBacklog, toggleUserMenu, toggleLog}
)(TopBar);


{'fraction_non_alphanumeric': 0.1588679245283019, 'fraction_numerical': 0.0, 'mean_word_length': 3.4554621848739497, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 51, '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': '4098830', 'n_tokens_mistral': 828, 'n_tokens_neox': 836, 'n_words': 181}