Fix tag/photo detail page for non-latin characters

This commit is contained in:
Sam Becker 2025-02-04 09:33:18 -06:00
parent 3ed2f28f2e
commit f2e74d8682

View File

@ -28,7 +28,9 @@ interface PhotoTagProps {
export async function generateMetadata({
params,
}: PhotoTagProps): Promise<Metadata> {
const { photoId, tag } = await params;
const { photoId, tag: tagFromParams } = await params;
const tag = decodeURIComponent(tagFromParams);
const { photo } = await getPhotosNearIdCachedCached(photoId, tag);
@ -60,7 +62,10 @@ export async function generateMetadata({
export default async function PhotoTagPage({
params,
}: PhotoTagProps) {
const { photoId, tag } = await params;
const { photoId, tag: tagFromParams } = await params;
const tag = decodeURIComponent(tagFromParams);
const { photo, photos, photosGrid, indexNumber } =
await getPhotosNearIdCachedCached(photoId, tag);