From 7b0c8cba384d22dc556f78b6d30a7ec9f0a760cb Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Wed, 4 May 2022 19:31:05 -0500 Subject: [PATCH] Use Video Listing for app benchmarks --- src/pages/app/[...appPath].astro | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/pages/app/[...appPath].astro b/src/pages/app/[...appPath].astro index ca36aea..4680e04 100644 --- a/src/pages/app/[...appPath].astro +++ b/src/pages/app/[...appPath].astro @@ -8,8 +8,9 @@ import { catchRedirectResponse } from '~/helpers/astro/request.js' import { ListingDetails } from '~/helpers/listing-page.js' import { getPathPartsFromAstroRequest } from '~/helpers/url.js' -import Layout from '../../layouts/default.astro' -import Listing from '../../components/default-listing.astro' +import Layout from '~/src/layouts/default.astro' +import Listing from '~/src/components/default-listing.astro' +import VideoListing from '~/src/components/video-listing.astro' const redirectResponse = await catchRedirectResponse( Astro ) @@ -22,7 +23,11 @@ if ( redirectResponse !== null ) { // Get type and slug from the request path // so that we don't have extra parts for // urls like /:type/:slug/benchmarks -const [ pathType, pathSlug ] = getPathPartsFromAstroRequest( Astro.request ) +const [ + pathType, + pathSlug, + subSlug = null +] = getPathPartsFromAstroRequest( Astro.request ) // Create an empty API URL const apiUrl = new URL( import.meta.env.PUBLIC_API_DOMAIN ) @@ -51,9 +56,14 @@ const listingDetails = new ListingDetails( appListing ) - - + { subSlug === 'benchmarks' ? ( + + ) : ( + + )}