<commit_before>import React from 'react';
import ReactDOM from 'react-dom';
import TemplateForm from './components/template.jsx';
import CompetencyFrameworkForm from './components/competency_framework_editor_form.jsx';
import ContentNotesForm from './components/content_notes.jsx';
import FeedbackSwitchForm from './components/feedback_switch.jsx';
import SectionFieldsForm  from './components/section.jsx';
import FilesDisplay from './components/files_display.jsx';
import TagsForm from './components/tags.jsx';
import ResourcesSearch from './components/resources_search.jsx';

$(() => {
  var templateForm  = document.querySelector('#template');
  var templateInfo = $('#template').attr('data-templateInfo');
  var courseInfo = $('#template').attr('data-courseInfo');
  var tags = $('#template').attr('data-tags');
  var sections = $('#template').attr('data-sections');
  var sectionsFields = $('#template').attr('data-sectionsFields');
  var rubric = $('#template').attr('data-rubric');
  var rubricCompetencies = $('#template').attr('data-rubricCompetencies');

  if (templateForm) {
    if (templateInfo) {
      ReactDOM.render(<TemplateForm 
        rubric={rubric}
        rubricCompetencies={rubricCompetencies}
        sections={sections}
        sectionsFields={sectionsFields}
        tags={tags} 
        courseInfo={courseInfo} 
        templateInfo={templateInfo}/>,templateForm);      
    }
    else {
      ReactDOM.render(<TemplateForm />,templateForm);
    }
  }

  var competencyFrameworkForm  = document.querySelector('#competency-framework-editor');
  var frameworkId = $('#competency-framework-editor').attr('data-frameworkId');
  var frameworkName = $('#competency-framework-editor').attr('data-frameworkName');
  var frameworkCategories = $('#competency-framework-editor').attr('data-categories');


  if (competencyFrameworkForm) {
        if (frameworkId) {
            ReactDOM.render(<CompetencyFrameworkForm 
            frameworkId={frameworkId}
            frameworkName={frameworkName}
            frameworkCategories={frameworkCategories}
            />,competencyFrameworkForm);
        }
        else {
            ReactDOM.render(<CompetencyFrameworkForm />,competencyFrameworkForm);
        }
  }

  var feedbackSwitchForm = document.querySelector('#feedback-switch');
  var contentId = $('#feedback-switch').attr('data-contentId');
  var sectionId = $('#feedback-switch').attr('data-sectionId');
  var sectionComments = $('#feedback-switch').attr('data-sectionComments');

  if (feedbackSwitchForm) {
    ReactDOM.render(<FeedbackSwitchForm 
    contentId={contentId} 
    sectionId={sectionId} 
    sectionComments={sectionComments}
    loadInfo={loadInfo}/>,feedbackSwitchForm);
  }

  var sectionForm = document.querySelector('#section-fields');
  var contentId = $('#section-fields').attr('data-contentId');
  var sectionId = $('#section-fields').attr('data-sectionId');
  var loadInfo = $('#section-fields').attr('data-loadInfo');

  if (sectionForm) {
    ReactDOM.render(<SectionFieldsForm 
    contentId={contentId} 
    sectionId={sectionId} 
    loadInfo={loadInfo}/>,sectionForm);
  }

  var notes = document.querySelector('#notes');
  var contentId = $('#notes').attr('data-contentId');
  var notesData = $('#notes').attr('data-notes');

  if (notes) {
    ReactDOM.render(<ContentNotesForm 
    contentId={contentId} 
    notes={notesData} 
    />,notes);
  }

  var tags = document.querySelector('#tags');
  var contentId = $('#tags').attr('data-contentId');
  var tagsData = $('#tags').attr('data-tags');

  if (tags) {
    ReactDOM.render(<TagsForm 
    contentId={contentId} 
    tags={tagsData} 
    />,tags);
  }

  var files = document.querySelector('#content-files');
  var filesData = $('#content-files').attr('data-files');

  if (files) {
    ReactDOM.render(<FilesDisplay
    files={filesData} 
    />,files);
  }

var resourcesSearch = document.querySelector('#resources-search');
var resourcesData = $('#resources-search').attr('data-resources');

if (resourcesSearch) {
    ReactDOM.render(<ResourcesSearch
    data={resourcesData} 
    />,resourcesSearch);
  }

});<commit_msg>Content image not displaying<commit_after>import React from 'react';
import ReactDOM from 'react-dom';
import TemplateForm from './components/template.jsx';
import CompetencyFrameworkForm from './components/competency_framework_editor_form.jsx';
import ContentNotesForm from './components/content_notes.jsx';
import FeedbackSwitchForm from './components/feedback_switch.jsx';
import SectionFieldsForm  from './components/section.jsx';
import FilesDisplay from './components/files_display.jsx';
import TagsForm from './components/tags.jsx';
import ResourcesSearch from './components/resources_search.jsx';

$(() => {
  var templateForm  = document.querySelector('#template');
  var templateInfo = $('#template').attr('data-templateInfo');
  var courseInfo = $('#template').attr('data-courseInfo');
  var tags = $('#template').attr('data-tags');
  var sections = $('#template').attr('data-sections');
  var sectionsFields = $('#template').attr('data-sectionsFields');
  var rubric = $('#template').attr('data-rubric');
  var rubricCompetencies = $('#template').attr('data-rubricCompetencies');

  if (templateForm) {
    if (templateInfo) {
      ReactDOM.render(<TemplateForm 
        rubric={rubric}
        rubricCompetencies={rubricCompetencies}
        sections={sections}
        sectionsFields={sectionsFields}
        tags={tags} 
        courseInfo={courseInfo} 
        templateInfo={templateInfo}/>,templateForm);      
    }
    else {
      ReactDOM.render(<TemplateForm />,templateForm);
    }
  }

  var competencyFrameworkForm  = document.querySelector('#competency-framework-editor');
  var frameworkId = $('#competency-framework-editor').attr('data-frameworkId');
  var frameworkName = $('#competency-framework-editor').attr('data-frameworkName');
  var frameworkCategories = $('#competency-framework-editor').attr('data-categories');


  if (competencyFrameworkForm) {
        if (frameworkId) {
            ReactDOM.render(<CompetencyFrameworkForm 
            frameworkId={frameworkId}
            frameworkName={frameworkName}
            frameworkCategories={frameworkCategories}
            />,competencyFrameworkForm);
        }
        else {
            ReactDOM.render(<CompetencyFrameworkForm />,competencyFrameworkForm);
        }
  }

  var feedbackSwitchForm = document.querySelector('#feedback-switch');
  var contentId = $('#feedback-switch').attr('data-contentId');
  var sectionId = $('#feedback-switch').attr('data-sectionId');
  var sectionComments = $('#feedback-switch').attr('data-sectionComments');

  if (feedbackSwitchForm) {
    ReactDOM.render(<FeedbackSwitchForm 
    contentId={contentId} 
    sectionId={sectionId} 
    sectionComments={sectionComments}
    loadInfo={loadInfo}/>,feedbackSwitchForm);
  }

  var sectionForm = document.querySelector('#section-fields');
  var contentId = $('#section-fields').attr('data-contentId');
  var sectionId = $('#section-fields').attr('data-sectionId');
  var loadInfo = $('#section-fields').attr('data-loadInfo');

  if (sectionForm) {
    ReactDOM.render(<SectionFieldsForm 
    contentId={contentId} 
    sectionId={sectionId} 
    loadInfo={loadInfo}/>,sectionForm);
  }

  var notes = document.querySelector('#notes');
  var contentId = $('#notes').attr('data-contentId');
  var notesData = $('#notes').attr('data-notes');

  if (notes) {
    ReactDOM.render(<ContentNotesForm 
    contentId={contentId} 
    notes={notesData} 
    />,notes);
  }

  var tags = document.querySelector('#tags');
  var contentId = $('#tags').attr('data-contentId');
  var tagsData = $('#tags').attr('data-tags');

  if (tags) {
    ReactDOM.render(<TagsForm 
    contentId={contentId} 
    tags={tagsData} 
    />,tags);
  }

  var files = document.querySelector('#content-files');
  var filesData = $('#content-files').attr('data-files');

  consoloe.log("FILES "+JSON.stringify(filesData));

  if (files) {
    ReactDOM.render(<FilesDisplay
    files={filesData} 
    />,files);
  }

var resourcesSearch = document.querySelector('#resources-search');
var resourcesData = $('#resources-search').attr('data-resources');

if (resourcesSearch) {
    ReactDOM.render(<ResourcesSearch
    data={resourcesData} 
    />,resourcesSearch);
  }

});
{'fraction_non_alphanumeric': 0.15933014354066985, 'fraction_numerical': 0.0, 'mean_word_length': 4.28842504743833, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, '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': '2859771', 'n_tokens_mistral': 2380, 'n_tokens_neox': 2310, 'n_words': 389}