diff --git a/website/pages/vmware/downloads/index.jsx b/website/pages/vmware/downloads/index.jsx index b3bdd310a..10a497a1d 100644 --- a/website/pages/vmware/downloads/index.jsx +++ b/website/pages/vmware/downloads/index.jsx @@ -4,7 +4,7 @@ import ProductDownloader from '@hashicorp/react-product-downloader' import Head from 'next/head' import HashiHead from '@hashicorp/react-head' -export default function DownloadsPage({ downloadData }) { +export default function DownloadsPage({ releaseData }) { return (
@@ -26,16 +26,8 @@ export async function getStaticProps() { return fetch( `https://releases.hashicorp.com/vagrant-vmware-utility/${VMWARE_UTILITY_VERSION}/index.json` ) - .then((r) => r.json()) - .then((r) => { - // TODO: restructure product-downloader to run this logic internally - return r.builds.reduce((acc, build) => { - if (!acc[build.os]) acc[build.os] = {} - acc[build.os][build.arch] = build.url - return acc - }, {}) - }) - .then((r) => ({ props: { downloadData: r } })) + .then((res) => res.json()) + .then((releaseData) => ({ props: { releaseData } })) .catch(() => { throw new Error( `--------------------------------------------------------