<commit_before>import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import Section from 'shared/components/section/section';
import SchoolCard from 'shared/components/schoolCard/schoolCard';
import styles from './approvedSchools.css';


const endpoint = 'https://raw.githubusercontent.com/OperationCode/operationcode_frontend/code-schools-cooper-kyle/src/scenes/home/codeSchools/schools.json';
// const endpoint = 'https://api.operationcode.org/api/v1/code_schools.json';
const gettingSchoolData = fetch(endpoint)
  .then(response => response.json());


class ApprovedSchools extends Component {
  constructor(props) {
    super(props);
    this.state = {
      vaSchools: null
    };

    gettingSchoolData.then(data =>
      this.setState({ vaSchools: data.va_approved })
    );
  }

  render() {
    const vaSchools = !this.state.vaSchools ? null : this.state.vaSchools.map(s =>
                        (
                          <SchoolCard
                            schoolName={s.name}
                            schoolAddress={s.address1}
                            schoolCity={s.city}
                            schoolState={s.state}
                          />
                        )
                      );
    return (
      <Section
        title="VA-Approved Schools"
        headingLines={false}
        margin
      >
        <div className={styles.vaSchools}>
          {vaSchools}
        </div>

        <div className={styles.noteForSchoolReps}>
          <p>
            Are you a code school seeking state and/or VA approval?
            <br />
            <Link to="mailto:<EMAIL>" role="button">
              Request technical assistance today.
            </Link>
          </p>
        </div>
      </Section>
    );
  }
}

export default ApprovedSchools;
<commit_msg>Temporary endpoint edit to GH repo internal json<commit_after>import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import Section from 'shared/components/section/section';
import SchoolCard from 'shared/components/schoolCard/schoolCard';
import styles from './approvedSchools.css';


// const endpoint = 'https://api.operationcode.org/api/v1/code_schools.json';
const endpoint = 'https://raw.githubusercontent.com/OperationCode/operationcode_frontend/code-schools-cooper-kyle/src/scenes/home/codeSchools/schools.json';
const gettingSchoolData = fetch(endpoint)
  .then(response => response.json());


class ApprovedSchools extends Component {
  constructor(props) {
    super(props);
    this.state = {
      vaSchools: null
    };

    gettingSchoolData.then(data =>
      this.setState({ vaSchools: data.va_approved })
    );
  }

  render() {
    const vaSchools = !this.state.vaSchools ? null : this.state.vaSchools.map(s =>
                        (
                          <SchoolCard
                            schoolName={s.name}
                            schoolAddress={s.address1}
                            schoolCity={s.city}
                            schoolState={s.state}
                          />
                        )
                      );
    return (
      <Section
        title="VA-Approved Schools"
        headingLines={false}
        margin
      >
        <div className={styles.vaSchools}>
          {vaSchools}
        </div>

        <div className={styles.noteForSchoolReps}>
          <p>
            Are you a code school seeking state and/or VA approval?
            <br />
            <Link to="mailto:<EMAIL>" role="button">
              Request technical assistance today.
            </Link>
          </p>
        </div>
      </Section>
    );
  }
}

export default ApprovedSchools;

{'fraction_non_alphanumeric': 0.11342155009451796, 'fraction_numerical': 0.001080205238995409, 'mean_word_length': 1.8188736681887367, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 35, 'https://': 4, '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': '7486578', 'n_tokens_mistral': 1026, 'n_tokens_neox': 998, 'n_words': 195}