<commit_before>import React from "react";
import Link from "next/link";
import PropTypes from "prop-types";
import getConfig from "next/config";

import { Unlock, Lock } from "react-feather";

const { publicRuntimeConfig } = getConfig();
const DEFAULT_LOGO =
  publicRuntimeConfig.DEFAULT_LOGO || "logo-generique-startup-carre.jpg";

const ApiCard = ({ title, url, contract, image, owner, description }) => {
  return (
    <>
      <Link href={url}>
        <a className="ui fluid card api-card">
          <div className="content">
            <img
              className="right floated mini ui image"
              src={`/images/api-logo/${image || DEFAULT_LOGO}`}
              alt={image ? `logo de ${title}` : "logo générique api.gouv"}
            />

            <div className="header">{title}</div>

            <div className="description">{description}</div>
          </div>

          <div className="card-extra">
            <div>
              <b>Produit par :</b> {owner}
            </div>
          </div>

          <div className="card-extra">
            <div className="contract">
              {contract === "OUVERT" ? (
                <>
                  <Unlock /><commit_msg>Indicates when it's a co-production<commit_after>import React from "react";
import Link from "next/link";
import PropTypes from "prop-types";
import getConfig from "next/config";

import { Unlock, Lock } from "react-feather";

const { publicRuntimeConfig } = getConfig();
const DEFAULT_LOGO =
  publicRuntimeConfig.DEFAULT_LOGO || "logo-generique-startup-carre.jpg";

const ApiCard = ({ title, url, contract, image, owner, description }) => {
  return (
    <>
      <Link href={url}>
        <a className="ui fluid card api-card">
          <div className="content">
            <img
              className="right floated mini ui image"
              src={`/images/api-logo/${image || DEFAULT_LOGO}`}
              alt={image ? `logo de ${title}` : "logo générique api.gouv"}
            />

            <div className="header">{title}</div>

            <div className="description">{description}</div>
          </div>

          <div className="card-extra">
            <div>
              <b>{owner.includes("&") ? "Cop" : "P"}roduit par :</b> {owner}
            </div>
          </div>

          <div className="card-extra">
            <div className="contract">
              {contract === "OUVERT" ? (
                <>
                  <Unlock />
{'fraction_non_alphanumeric': 0.1492295214922952, 'fraction_numerical': 0.0, 'mean_word_length': 2.0722291407222913, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 45, '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': '3181289', 'n_tokens_mistral': 700, 'n_tokens_neox': 690, 'n_words': 170}