<commit_before>import React, { useState } from 'react'
import PropTypes from 'prop-types'
import get from 'lodash/get'
import Alerter from 'cozy-ui/transpiled/react/Alerter'
import { useClient } from 'cozy-client'
import useRegistryInformation from 'hooks/useRegistryInformation'
import { KonnectorSuggestionModal } from 'cozy-harvest-lib'
import { useI18n } from 'cozy-ui/transpiled/react'
import SquareAppIcon from 'cozy-ui/transpiled/react/SquareAppIcon'

const CandidateServiceTile = ({ konnector }) => {
  const { t } = useI18n()
  const client = useClient()
  const { slug } = konnector
  const registryData = useRegistryInformation(client, slug)
  const name = registryData
    ? get(registryData, 'latest_version.manifest.name', slug)
    : ''
  const [isModalDisplayed, setModalDisplayed] = useState(false)

  return (
    <>
      {isModalDisplayed && (
        <KonnectorSuggestionModal
          konnectorAppSuggestion={konnector}
          konnectorManifest={get(registryData, 'latest_version.manifest', {})}
          onClose={() => {
            setModalDisplayed(false)
          }}
          onSilence={() => {
            setModalDisplayed(false)
            Alerter.success(t('connector.silenced', { name: name }))
          }}
        />
      )}
      <div className="scale-hover" onClick={() => setModalDisplayed(true)}>
        <SquareAppIcon app={slug} name={name} variant="ghost" />
      </div>
    </>
  )
}

CandidateServiceTile.propTypes = {
  konnector: PropTypes.shape({
    slug: PropTypes.string.isRequired
  }).isRequired
}<commit_msg>fix: Missing cursor pointer for candidate services<commit_after>import React, { useState } from 'react'
import PropTypes from 'prop-types'
import get from 'lodash/get'
import Alerter from 'cozy-ui/transpiled/react/Alerter'
import { useClient } from 'cozy-client'
import useRegistryInformation from 'hooks/useRegistryInformation'
import { KonnectorSuggestionModal } from 'cozy-harvest-lib'
import { useI18n } from 'cozy-ui/transpiled/react'
import SquareAppIcon from 'cozy-ui/transpiled/react/SquareAppIcon'

const CandidateServiceTile = ({ konnector }) => {
  const { t } = useI18n()
  const client = useClient()
  const { slug } = konnector
  const registryData = useRegistryInformation(client, slug)
  const name = registryData
    ? get(registryData, 'latest_version.manifest.name', slug)
    : ''
  const [isModalDisplayed, setModalDisplayed] = useState(false)

  return (
    <>
      {isModalDisplayed && (
        <KonnectorSuggestionModal
          konnectorAppSuggestion={konnector}
          konnectorManifest={get(registryData, 'latest_version.manifest', {})}
          onClose={() => {
            setModalDisplayed(false)
          }}
          onSilence={() => {
            setModalDisplayed(false)
            Alerter.success(t('connector.silenced', { name: name }))
          }}
        />
      )}
      <div
        className="scale-hover u-c-pointer"
        onClick={() => setModalDisplayed(true)}
      >
        <SquareAppIcon app={slug} name={name} variant="ghost" />
      </div>
    </>
  )
}

CandidateServiceTile.propTypes = {
  konnector: PropTypes.shape({
    slug: PropTypes.string.isRequired
  }).isRequired
}
{'fraction_non_alphanumeric': 0.1249221183800623, 'fraction_numerical': 0.0024922118380062306, 'mean_word_length': 3.287049399198932, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, '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': '3298812', 'n_tokens_mistral': 1000, 'n_tokens_neox': 994, 'n_words': 189}