<commit_before>import React from 'react';
import 'styles/header.scss';

class Header extends React.Component{
  /**
   * props:
   *   background: url for image
   *   opacity: float from 0 to 1
   */
  render(){
    let headerBackgroundStyle = {};
    let headerStyle = {};
    let headerClassName = '';
    if(this.props.background){
      headerBackgroundStyle = {
        'background': `url(${this.props.background}) no-repeat center center fixed`,
        'backgroundSize': 'cover'
      };
      headerClassName = 'full-header';
      headerStyle = {
        'background': `rgba(0, 0, 0, ${this.props.opacity || 0.12})`
      };
    }
    return <div style={headerBackgroundStyle}>
      <header className={headerClassName} style={headerStyle}>
        <div className="container header-child">
          {this.props.children}
        </div>
        <div className="downIcon">
          <i className="fa fa-chevron-down" aria-hidden="true"></i>
        </div>
      </header>
    </div>;
  }
}

export {Header};
<commit_msg>down arrow only when background present<commit_after>import React from 'react';
import 'styles/header.scss';

class Header extends React.Component{
  /**
   * props:
   *   background: url for image
   *   opacity: float from 0 to 1
   */
  render(){
    let headerBackgroundStyle = {};
    let headerStyle = {};
    let headerClassName = '';
    if(this.props.background){
      headerBackgroundStyle = {
        'background': `url(${this.props.background}) no-repeat center center fixed`,
        'backgroundSize': 'cover'
      };
      headerClassName = 'full-header';
      headerStyle = {
        'background': `rgba(0, 0, 0, ${this.props.opacity || 0.12})`
      };
    }
    return <div style={headerBackgroundStyle}>
      <header className={headerClassName} style={headerStyle}>
        <div className="container header-child">
          {this.props.children}
        </div>
        {this.props.background && <div className="downIcon">
          <i className="fa fa-chevron-down" aria-hidden="true"></i>
        </div>}
      </header>
    </div>;
  }
}

export {Header};

{'fraction_non_alphanumeric': 0.14969208905731882, 'fraction_numerical': 0.007579346281383231, 'mean_word_length': 2.6288659793814433, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '4184761', 'n_tokens_mistral': 624, 'n_tokens_neox': 609, 'n_words': 144}