<commit_before>import React from 'react';
import { StyleSheet, Text, View, Button, FlatList, ListItem, List, ScrollView } from 'react-native';
import { StackNavigator } from 'react-navigation';
import BasicText from './sub/basicText.js';
import { didyouknow } from '../content/didyouknow.js';
import { translatedText, translatedTitle } from '../routes/shared.js';
import { globals } from '../styles/globals.js';

export default class DidYouKnowScreen extends React.Component {
  static navigationOptions = {
    title: translatedTitle(didyouknow, 0)
  };
  get content() {
    var contentArr = [];
    for (let i = 1; i < didyouknow.length; i++) {
      if (didyouknow[i].notes) {
        // change to print both
        for (let j=0; j < didyouknow[i].notes.length; j++) {
          var text = didyouknow[i].notes[0].textEN;
          contentArr.push({key: {j}+10, text: translatedText(didyouknow[i].notes, j) });
        }
      } else {
        contentArr.push({key: {i}, text: translatedText(didyouknow, i)});
      }
    }
    return contentArr;
  }
  render() {
    return (
      <ScrollView style={[globals.base, globals.green]} >
      <FlatList
        data={this.content}
        renderItem={({item}) => <BasicText>{item.text}</BasicText>}
      />
      </ScrollView>
    );
  }
};<commit_msg>fixed a duplicate key error<commit_after>import React from 'react';
import { StyleSheet, Text, View, Button, FlatList, ListItem, List, ScrollView } from 'react-native';
import { StackNavigator } from 'react-navigation';
import BasicText from './sub/basicText.js';
import { didyouknow } from '../content/didyouknow.js';
import { translatedText, translatedTitle } from '../routes/shared.js';
import { globals } from '../styles/globals.js';

export default class DidYouKnowScreen extends React.Component {
  static navigationOptions = {
    title: translatedTitle(didyouknow, 0)
  };
  get content() {
    var contentArr = [];
    for (let i = 1; i < didyouknow.length; i++) {
      if (didyouknow[i].notes) {
        // change to print both
        for (let j=0; j < didyouknow[i].notes.length; j++) {
          contentArr.push({key: i+j, text: translatedText(didyouknow[i].notes, j) });
        }
      } else {
        contentArr.push({key: i, text: translatedText(didyouknow, i)});
      }
    }
    return contentArr;
  }
  render() {
    return (
      <ScrollView style={[globals.base, globals.green]} >
      <FlatList
        data={this.content}
        renderItem={({item}) => <BasicText>{item.text}</BasicText>}
      />
      </ScrollView>
    );
  }
};
{'fraction_non_alphanumeric': 0.15426567978184652, 'fraction_numerical': 0.003506038176860148, 'mean_word_length': 3.0062402496099843, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, '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': '1969198', 'n_tokens_mistral': 810, 'n_tokens_neox': 800, 'n_words': 193}