<commit_before>import React from 'react';
import PropTypes from 'prop-types';


const Member = ({ member, onChange }, context) => (
  <li>
    <div className="member-item">
      <div className="email-cell">
        <p>{member.email}</p>
      </div>
      <div className="access-select">
        <select className="select-full" style={{ textTransform: 'capitalize' }} onChange={onChange} name={member.id} defaultValue={member.role}>
          <option value="USER" className="capitalize" disabled={member.role === 'SUPER_ADMIN'}>{context.language.MembersView.user}</option>
          <option value="ADMIN" className="capitalize" disabled={member.role === 'SUPER_ADMIN'}>{context.language.MembersView.admin}</option>
          <option value="SUPER_ADMIN" className="capitalize">{context.language.MembersView.superadmin}</option>
          <option value="DELETE" className="capitalize" disabled={member.role === 'SUPER_ADMIN'}>{context.language.MembersView.delete}</option>
        </select>
      </div>
    </div>
  </li>
);


Member.contextTypes = {
  language: PropTypes.object,
};

Member.propTypes = {
  onChange: PropTypes.func.isRequired,
  member: PropTypes.shape({
    id: PropTypes.string,
    email: PropTypes.string,
    role: PropTypes.string,
  }).isRequired,
};

export default Member;<commit_msg>Moved propTypes and contextTypes to the top<commit_after>import React from 'react';
import PropTypes from 'prop-types';

const contextTypes = {
  language: PropTypes.object,
};

const propTypes = {
  onChange: PropTypes.func.isRequired,
  member: PropTypes.shape({
    id: PropTypes.string,
    email: PropTypes.string,
    role: PropTypes.string,
  }).isRequired,
};

const Member = ({ member, onChange }, context) => (
  <li>
    <div className="member-item">
      <div className="email-cell">
        <p>{member.email}</p>
      </div>
      <div className="access-select">
        <select className="select-full" style={{ textTransform: 'capitalize' }} onChange={onChange} name={member.id} defaultValue={member.role}>
          <option value="USER" className="capitalize" disabled={member.role === 'SUPER_ADMIN'}>{context.language.MembersView.user}</option>
          <option value="ADMIN" className="capitalize" disabled={member.role === 'SUPER_ADMIN'}>{context.language.MembersView.admin}</option>
          <option value="SUPER_ADMIN" className="capitalize">{context.language.MembersView.superadmin}</option>
          <option value="DELETE" className="capitalize" disabled={member.role === 'SUPER_ADMIN'}>{context.language.MembersView.delete}</option>
        </select>
      </div>
    </div>
  </li>
);

Member.propTypes = propTypes;
Member.contextTypes = contextTypes;

export default Member;
{'fraction_non_alphanumeric': 0.16058931860036832, 'fraction_numerical': 0.0, 'mean_word_length': 4.203065134099617, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 45, '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': '3723434', 'n_tokens_mistral': 797, 'n_tokens_neox': 799, 'n_words': 151}