import s from './merch-desktop-client.module.css' import InlineSvg from '@hashicorp/react-inline-svg' export default function MerchDesktopDownload({ version, releases }) { const { builds } = releases.versions[version] // Calculate all Operating Systems that we have versions for // and place their respective builds under them const operatingSystems = builds .map((build) => { return build.os }) .filter((value, index, self) => { // Parse out duplicates return self.indexOf(value) === index }) .map((os) => { // Add the respective builds under their OS return { os: os, builds: builds.filter((build) => { return build.os === os }), } }) return (
Desktop Client - {version}
) } function humanArch(arch) { if (arch === '386') { return '32-bit' } if (arch === 'amd64') { return '64-bit' } return arch } function getFileExtension(filename) { return filename.substring(filename.lastIndexOf('.') + 1, filename.length) }