From 69ef5575c1a6eff343e19b2bf1dfe7aec036633c Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Fri, 10 Jun 2022 17:08:16 -0500 Subject: [PATCH] Add Game Reports component --- .../listing-parts/game-reports.astro | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/components/listing-parts/game-reports.astro diff --git a/src/components/listing-parts/game-reports.astro b/src/components/listing-parts/game-reports.astro new file mode 100644 index 0000000..c124192 --- /dev/null +++ b/src/components/listing-parts/game-reports.astro @@ -0,0 +1,77 @@ +--- +// import { getStatusOfScan } from '~/helpers/statuses.js' +// import { supportedArchitectures } from '~/helpers/bundles.js' +import { ensureListingDetails } from '~/helpers/listing-page' +import Heading from './heading.astro' + +const { + listing +} = Astro.props + +const details = ensureListingDetails(listing) + +const hasReports = Array.isArray( details.api.reports ) && details.api.reports.length > 0 + +--- +{ hasReports && ( + + + + + +)}