From 9bdb7da98ce145432cada976b1252d269fdd9bc3 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 29 Mar 2025 23:40:01 -0500 Subject: [PATCH] Parameterize static camera paths --- app/shot-on/[make]/[model]/image/route.tsx | 2 +- app/shot-on/[make]/[model]/page.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/shot-on/[make]/[model]/image/route.tsx b/app/shot-on/[make]/[model]/image/route.tsx index 90d00979..658a8efb 100644 --- a/app/shot-on/[make]/[model]/image/route.tsx +++ b/app/shot-on/[make]/[model]/image/route.tsx @@ -15,7 +15,7 @@ export const generateStaticParams = staticallyGenerateCategoryIfConfigured( 'cameras', 'image', getUniqueCameras, - cameras => cameras.map(({ camera }) => camera), + cameras => cameras.map(({ camera }) => formatCameraParams(camera)), ); export async function GET( diff --git a/app/shot-on/[make]/[model]/page.tsx b/app/shot-on/[make]/[model]/page.tsx index b25a0553..cb597b0b 100644 --- a/app/shot-on/[make]/[model]/page.tsx +++ b/app/shot-on/[make]/[model]/page.tsx @@ -1,5 +1,5 @@ import { Metadata } from 'next/types'; -import { CameraProps } from '@/camera'; +import { CameraProps, formatCameraParams } from '@/camera'; import { generateMetaForCamera } from '@/camera/meta'; import { INFINITE_SCROLL_GRID_INITIAL } from '@/photo'; import { getPhotosCameraDataCached } from '@/camera/data'; @@ -21,7 +21,7 @@ export const generateStaticParams = staticallyGenerateCategoryIfConfigured( 'cameras', 'page', getUniqueCameras, - cameras => cameras.map(({ camera }) => camera), + cameras => cameras.map(({ camera }) => formatCameraParams(camera)), ); export async function generateMetadata({