import orderBy from 'lodash/orderBy'; import type {Relay, RelayActivity} from 'sentry/types/relay'; import ActivityList from './activityList'; import CardHeader from './cardHeader'; import {getRelaysByPublicKey} from './utils'; import WaitingActivity from './waitingActivity'; type CardHeaderProps = React.ComponentProps; type WaitingActivityProps = React.ComponentProps; type Props = { disabled: boolean; relayActivities: Array; relays: Array; } & Pick & Pick; function List({relays, relayActivities, onRefresh, onDelete, onEdit, disabled}: Props) { const orderedRelays = orderBy(relays, relay => relay.created, ['desc']); const relaysByPublicKey = getRelaysByPublicKey(orderedRelays, relayActivities); const renderCardContent = (activities: Array) => { if (!activities.length) { return ; } return ; }; return (
{Object.keys(relaysByPublicKey).map(relayByPublicKey => { const {name, description, created, activities} = relaysByPublicKey[relayByPublicKey]; return (
{renderCardContent(activities)}
); })}
); } export default List;