{"size": 1158, "ext": "js", "max_stars_repo_path": "demo/Flow/Cards.react.js", "max_stars_repo_name": "denvash/summer-time-theme-vscode", "max_stars_repo_stars_event_min_datetime": "2019-02-21T09:33:50.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-14T03:14:13.000Z", "max_issues_repo_path": "demo/Flow/Cards.react.js", "max_issues_repo_name": "denvash/summer-time-theme-vscode", "max_issues_repo_issues_event_min_datetime": "2019-08-28T09:14:25.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T07:46:46.000Z", "max_forks_repo_path": "demo/Flow/Cards.react.js", "max_forks_repo_name": "denvash/summer-time-theme-vscode", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 14, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 21.4444444444, "max_line_length": 75, "alphanum_fraction": 0.6018998273}
/**
 * (c) Facebook, Inc. and its affiliates. Confidential and proprietary.
 *
 * @emails oncall+onavo_data_dev
 * @flow strict-local
 * @format
 */

'use strict';

import type { MintAppsCards_cards$key } from 'MintAppsCards_cards.graphql';

const MintEntityCard = require('MintEntityCard.react');
const React = require('React');
const {graphql, useFragment} = require('RelayHooks');

const fragment = graphql`
  fragment MintAppsCards_cards on MintCards {
    cards {
      id
      logo_url
      name
    }
  }
`;

export type AppsCardsProp = $ReadOnly<{
  cardsData: MintAppsCards_cards$key,
}>;

function MintAppsCards({cardsData}: AppsCardsProp): React.MixedElement {
  const {cards} = useFragment(fragment, cardsData);

  return (
    <>
      {cards.map(card => {
        const mintEntityId = card?.id ?? '';
        const name = card?.name ?? '';
        const icon = card?.logo_url ?? '';
        return (
          <MintEntityCard
            {...{name, icon, mintEntityId}}
            key={mintEntityId}
            details={['details']}
            metrics={[]}
          />
        );
      })}
    </>
  );
}

module.exports = MintAppsCards;
