From d9914ef49dbc744e85644de2ef91da99498889d6 Mon Sep 17 00:00:00 2001 From: Bryceson Laing Date: Wed, 9 Oct 2024 16:22:31 -0500 Subject: [PATCH] fixed datacite#2211 (#398) --- src/app/doi.org/[...doi]/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/doi.org/[...doi]/page.tsx b/src/app/doi.org/[...doi]/page.tsx index d9212239..fa15e2b3 100644 --- a/src/app/doi.org/[...doi]/page.tsx +++ b/src/app/doi.org/[...doi]/page.tsx @@ -38,7 +38,7 @@ interface Props { export async function generateMetadata({ params }: Props): Promise { - const doi = params.doi.join('/') + const doi = decodeURIComponent(params.doi.join('/')) const { data } = await apolloClient.query({ query: DOI_METADATA_QUERY, @@ -117,7 +117,7 @@ function mapSearchparams(searchParams: Props['searchParams']) { export default async function Page({ params, searchParams }: Props) { - const doi = params.doi.join('/') + const doi = decodeURIComponent(params.doi.join('/')) const { connectionType, isBot, ...vars } = mapSearchparams(searchParams) const variables = { id: doi, ...vars } @@ -153,7 +153,7 @@ export default async function Page({ params, searchParams }: Props) { - +