Fix tag/photo detail page for non-latin characters
This commit is contained in:
parent
3ed2f28f2e
commit
f2e74d8682
@ -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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user