import React from 'react'; import { Endpoints } from '@octokit/types'; export interface FirmwareCardProps { variant: string; description: string; firmware: Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]["data"]; } export const FirmwareCard = ({ variant, description, firmware, }: FirmwareCardProps): JSX.Element => { return (

{variant}

{firmware?.length && ( {firmware[0].name} )}

{description}

{firmware?.length ? ( <> Download

Older versions

{firmware.slice(1, 6).map((release) => { return (
{release.name}
); })}
) : ( )}
); };