<commit_before>import React from 'react';
import $ from 'jquery';

import ApiMixin from '../../mixins/apiMixin';
import ConfigStore from '../../stores/configStore';
import OrganizationState from '../../mixins/organizationState';
import {Link} from 'react-router';

import Broadcasts from './broadcasts';
import StatusPage from './statuspage';
import UserNav from './userNav';
import OrganizationSelector from './organizationSelector';
import TodoList from '../todos';

const OnboardingStatus = React.createClass({
  propTypes: {
    onHideTodos: React.PropTypes.func
  },

  render() {
    let org = this.props.org;
    if (org.features.indexOf('onboarding') === -1 && !org.onboardingTasks)
      return null;

    let percentage = Math.round(
      (org.onboardingTasks.filter(
        t => t.status === 'complete'
      ).length) / TodoList.TASKS.length * 100
    ).toString();
    let style = {
      width: percentage + '%',
    };

    if (percentage >= 100)
      return null;<commit_msg>defaulting org.onboardingTask to empty array<commit_after>import React from 'react';
import $ from 'jquery';

import ApiMixin from '../../mixins/apiMixin';
import ConfigStore from '../../stores/configStore';
import OrganizationState from '../../mixins/organizationState';
import {Link} from 'react-router';

import Broadcasts from './broadcasts';
import StatusPage from './statuspage';
import UserNav from './userNav';
import OrganizationSelector from './organizationSelector';
import TodoList from '../todos';

const OnboardingStatus = React.createClass({
  propTypes: {
    onHideTodos: React.PropTypes.func
  },

  render() {
    let org = this.props.org;
    if (org.features.indexOf('onboarding') === -1)
      return null;

    let percentage = Math.round(
      ((org.onboardingTasks || []).filter(
        t => t.status === 'complete'
      ).length) / TodoList.TASKS.length * 100
    ).toString();
    let style = {
      width: percentage + '%',
    };

    if (percentage >= 100)
      return null;
{'fraction_non_alphanumeric': 0.15027458811782327, 'fraction_numerical': 0.006989515726410384, 'mean_word_length': 3.3096774193548386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6717181', 'n_tokens_mistral': 605, 'n_tokens_neox': 577, 'n_words': 161}