<commit_before>import React, { Component } from 'react'
import GitHubForkRibbon from 'react-github-fork-ribbon'
import Header from './Header.jsx'

export class App extends Component {
  render() {
    return (
    <div className="app" thingy={true}>
      <GitHubForkRibbon
        href="//github.com/brooksn/iocupid" 
        position="right" 
        color="black">
        Fork me on GitHub
      </GitHubForkRibbon>
      <div style={{marginLeft:'0.4em', marginRight:'0.4em'}}>
        <Header />
        <div className="container">
          {this.props.children}
        </div>
      </div>
    </div>
    )
  }
}<commit_msg>Child components receive JWT payload in props<commit_after>import React, { Component } from 'react'
import GitHubForkRibbon from 'react-github-fork-ribbon'
import store, { getJWTPayload, CHANGE_EVENT } from '../stores/authStore.js'
import Header from './Header.jsx'

export class App extends Component {
  constructor(props) {
    super(props)
    this.state = {
      jwtPayload: getJWTPayload()
    }
  }
  render() {
    const childrenWithProps = React.Children.map(this.props.children,
      child => React.cloneElement(child, {
          jwtPayload: this.state.jwtPayload || null
        })
      )
    return (
    <div className="app" thingy={true}>
      <GitHubForkRibbon
        href="//github.com/brooksn/iocupid" 
        position="right" 
        color="black">
        Fork me on GitHub
      </GitHubForkRibbon>
      <div style={{marginLeft:'0.4em', marginRight:'0.4em'}}>
        <Header jwtPayload={this.state.jwtPayload} />
        <div className="container">
          {childrenWithProps}
        </div>
      </div>
    </div>
    )
  }
  authStoreChange() {
    this.setState({jwtPayload: getJWTPayload()})
  }
  componentDidMount() {
    store.on(CHANGE_EVENT, this.authStoreChange.bind(this))
  }
  componentWillUnmount() {
    store.removeListener(CHANGE_EVENT, this.authStoreChange.bind(this))
  }
}
{'fraction_non_alphanumeric': 0.13496932515337423, 'fraction_numerical': 0.00408997955010225, 'mean_word_length': 2.7562380038387717, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 22, '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': '7195177', 'n_tokens_mistral': 645, 'n_tokens_neox': 633, 'n_words': 119}