<commit_before>import * as React from 'react';
// import { DisableableAction } from '@shopify/polaris/types/';
import { SearchItem, Requester } from '../../types';
import { ResourceList } from '@shopify/polaris';
import InfoContainer from './InfoContainer';
// import { actions } from '../../utils/hitItem';
import { truncate } from '../../utils/formatting';
import { generateBadges } from '../../utils/badges';

export interface Props {
  readonly hit: SearchItem;
  readonly requester?: Requester;
  readonly onClick: (groupId: string) => void;
}

const SearchCard = ({ hit, requester, onClick }: Props) => {
  const { requesterName, title } = hit;
  const handleClick = () => onClick(hit.groupId);

  const actions = [
    {
      primary: true,
      content: 'Accept',
      accessibilityLabel: 'Accept',
      icon: 'add',
      onClick: handleClick
    }
  ];

  return (
    <ResourceList.Item
      actions={actions}
      badges={generateBadges(requester)}
      attributeOne={truncate(requesterName, 40)}
      attributeTwo={truncate(title, 80)}
      attributeThree={
        <InfoContainer reward={hit.reward} batchSize={hit.batchSize} />}
    />
  );
};

export default SearchCard;<commit_msg>Action button is no longer primary.<commit_after>import * as React from 'react';
// import { DisableableAction } from '@shopify/polaris/types/';
import { SearchItem, Requester } from '../../types';
import { ResourceList } from '@shopify/polaris';
import InfoContainer from './InfoContainer';
// import { actions } from '../../utils/hitItem';
import { truncate } from '../../utils/formatting';
import { generateBadges } from '../../utils/badges';

export interface Props {
  readonly hit: SearchItem;
  readonly requester?: Requester;
  readonly onClick: (groupId: string) => void;
}

const SearchCard = ({ hit, requester, onClick }: Props) => {
  const { requesterName, title } = hit;
  const handleClick = () => onClick(hit.groupId);

  const actions = [
    {
      content: 'Accept',
      accessibilityLabel: 'Accept',
      icon: 'add',
      onClick: handleClick
    }
  ];

  return (
    <ResourceList.Item
      actions={actions}
      badges={generateBadges(requester)}
      attributeOne={truncate(requesterName, 40)}
      attributeTwo={truncate(title, 80)}
      attributeThree={
        <InfoContainer reward={hit.reward} batchSize={hit.batchSize} />
      }
    />
  );
};

export default SearchCard;
{'fraction_non_alphanumeric': 0.15152766308835672, 'fraction_numerical': 0.0033030553261767133, 'mean_word_length': 3.3422939068100357, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '6974870', 'n_tokens_mistral': 712, 'n_tokens_neox': 704, 'n_words': 178}