<commit_before>import React from 'react';
import * as styles from './PopOver.scss';

const PopOver = ({ next, active, order, xPos, yPos, children }) => {
  if (!active) {
    return null;
  }
  return (
    <div className={styles.modal} style={{ top: yPos, left: xPos }}>
      {children}
      <div className={styles.footer}>
        <button onClick={next.bind(null, order + 1)}>Next</button>
      </div>
    </div>
  );
};

export default PopOver;<commit_msg>Display different buttons for first and last help boxes<commit_after>import React from 'react';
import * as styles from './PopOver.scss';

const PopOver = ({ next, active, first, last, previous, xPos, yPos, children }) => {
  if (!active) {
    return null;
  }
  const text = last ? 'End' : 'Next';
  return (
    <div className={styles.modal} style={{ top: yPos, left: xPos }}>
      {children}
      <div className={styles.footer}>
        {first ?
          <div /> :
          <button onClick={previous}>Prev</button>
        }
        <button onClick={next}>{text}</button>
      </div>
    </div>
  );
};

export default PopOver;
{'fraction_non_alphanumeric': 0.16393442622950818, 'fraction_numerical': 0.0009107468123861566, 'mean_word_length': 2.88339222614841, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 20, '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': '7025567', 'n_tokens_mistral': 346, 'n_tokens_neox': 345, 'n_words': 98}