<commit_before>var React = require('react');
var builder = require('focus').component.builder
//var i18nMixin = require('../i18n').mixin;
var StickyNavigation = require('../sticky-navigation').component
var type = require('focus').component.types;
var stylable = require('../../mixin/stylable')
/**
 * Mixin used in order to create a Detail.
 * @type {Object}
 */
var detailMixin = {
  mixins: [stylable],
  /** @inheritedDoc */
  getDefaultProps: function getDetailDefaultProps(){
    return {
      /**
       * Activate the presence of the sticky navigation component.
       * @type {Boolean}
       */
      navigation: true
    }
  },
  /** @inheritedDoc */
  propTypes: {
    navigation: type('bool')
  },
  /**
   * Render the navigation component if the props navigation is true.
   * @returns {Object} - The jsx component.
   */
  renderNavigation: function(){
    if(this.props.navigation){
      return <StickyNavigation contentSelector='[data-focus="detail-content"'/>;
    } return;
  },
  /** @inheritedDoc */
  render: function renderDetail(){
    return(
      <div className={`${this._getStyleClassName()}`}  data-focus='detail'>
        {this.renderNavigation()}
        <div data-focus='detail-content'>
          {this.props.children}
        </div>
      </div>
    );
  }
}
module.exports = builder(detailMixin);<commit_msg>[sticky-navigation] Fix detail component<commit_after>var React = require('react');
var builder = require('focus').component.builder
//var i18nMixin = require('../i18n').mixin;
var StickyNavigation = require('../sticky-navigation').component
var type = require('focus').component.types;
var stylable = require('../../mixin/stylable')
/**
 * Mixin used in order to create a Detail.
 * @type {Object}
 */
var detailMixin = {
  mixins: [stylable],
  /** @inheritedDoc */
  getDefaultProps: function getDetailDefaultProps(){
    return {
      /**
       * Activate the presence of the sticky navigation component.
       * @type {Boolean}
       */
      navigation: true
    }
  },
  /** @inheritedDoc */
  propTypes: {
    navigation: type('bool')
  },
  /**
   * Render the navigation component if the props navigation is true.
   * @returns {Object} - The jsx component.
   */
  renderNavigation: function(){
    if(this.props.navigation){
      return <StickyNavigation/>;
    } return;
  },
  /** @inheritedDoc */
  render: function renderDetail(){
    return(
      <div className={`${this._getStyleClassName()}`}  data-focus='detail'>
        {this.renderNavigation()}
        <div data-focus='detail-content'>
          {this.props.children}
        </div>
      </div>
    );
  }
}
module.exports = builder(detailMixin);
{'fraction_non_alphanumeric': 0.15781600598354525, 'fraction_numerical': 0.0029917726252804786, 'mean_word_length': 2.9925373134328357, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2188192', 'n_tokens_mistral': 798, 'n_tokens_neox': 793, 'n_words': 183}