<commit_before>import React from 'react';

import ProjectPage from 'jsx/components/ProjectPage';
import portfolio from './portfolio';

function getProjectBySlug(slug) {
  for (const project of portfolio) {
    if (slug === project.slug) {
      return project;
    };
  };
}

export default function Project(props) {
  const slug = props.params.projectSlug;
  const project = getProjectBySlug(slug);

  return (
    <ProjectPage {...project}>
      {project.description}
    </ProjectPage>
  );
}<commit_msg>Simplify project retrieveal<commit_after>import React from 'react';

import ProjectPage from 'jsx/components/ProjectPage';
import portfolio from './portfolio';

function getProjectBySlug(slug) {
  return portfolio.find(project => project.slug === slug);
}

export default function Project(props) {
  const project = getProjectBySlug(props.params.projectSlug);

  return (
    <ProjectPage {...project}>
      {project.description}
    </ProjectPage>
  );
}
{'fraction_non_alphanumeric': 0.12344398340248963, 'fraction_numerical': 0.0, 'mean_word_length': 4.160427807486631, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '5752711', 'n_tokens_mistral': 286, 'n_tokens_neox': 284, 'n_words': 71}