--- // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ import { DoesItAPI } from '~/helpers/api/client.js' import { getPathPartsFromAstroRequest } from '~/helpers/url.js' import { catchRedirectResponse } from '~/helpers/astro/request.js' import { deviceSupportsApp } from '~/helpers/devices.js' import Layout from '../../layouts/default.astro' import Search from '~/components/search-stork.vue' import LinkButton from '~/components/link-button.vue' // Get type and slug from the request path // so that we don't have extra parts for // urls like /:type/:slug/benchmarks const { pathname, pathSlug, subSlug = 1 } = getPathPartsFromAstroRequest( Astro.request ) const redirectResponse = await catchRedirectResponse( Astro ) if ( redirectResponse !== null ) { return redirectResponse } const device = await DoesItAPI.device( pathSlug ).get() const rawAppPage = await DoesItAPI.kind( 'app' )( subSlug ).get() const appPage = { ...rawAppPage, // Map out paginnation links // so we stay in the context of this device previousPage: rawAppPage.previousPage.replace( '/kind/app', '/device/' + pathSlug ), nextPage: rawAppPage.nextPage.replace( '/kind/app', '/device/' + pathSlug ), // Map device support over text/status items: rawAppPage.items.map( listing => { const listingIsSupported = deviceSupportsApp( device, listing ) return { ...listing, text: listingIsSupported ? `✅ Supported on ${ device.name }` : `🚫 Not yet reported working on ${ device.name }`, } }) } ---

Apple Silicon Support for { device.name }

{ device.description }

Supported apps include { appPage.summary.sampleNamesShort }.
{ !!device.amazonUrl &&
Check Pricing
}