({
release: { versionWithPrefix },
children,
})
| 14 | type DownloadButtonProps = { release: NodeRelease }; |
| 15 | |
| 16 | const DownloadButton: FC<PropsWithChildren<DownloadButtonProps>> = ({ |
| 17 | release: { versionWithPrefix }, |
| 18 | children, |
| 19 | }) => { |
| 20 | const { os, bitness, architecture } = getClientContext(); |
| 21 | |
| 22 | const platform = getUserPlatform(architecture, bitness); |
| 23 | const downloadLink = getNodeDownloadUrl({ versionWithPrefix, os, platform }); |
| 24 | |
| 25 | return ( |
| 26 | <> |
| 27 | <Button |
| 28 | kind="special" |
| 29 | href={downloadLink} |
| 30 | className={classNames(styles.downloadButton, styles.special)} |
| 31 | > |
| 32 | {children} |
| 33 | |
| 34 | <CloudArrowDownIcon /> |
| 35 | </Button> |
| 36 | |
| 37 | <Button |
| 38 | kind="primary" |
| 39 | href={downloadLink} |
| 40 | className={classNames(styles.downloadButton, styles.primary)} |
| 41 | > |
| 42 | {children} |
| 43 | |
| 44 | <CloudArrowDownIcon /> |
| 45 | </Button> |
| 46 | </> |
| 47 | ); |
| 48 | }; |
| 49 | |
| 50 | export default DownloadButton; |
nothing calls this directly
no test coverage detected