Skip to content

Commit

Permalink
[DEV-1798] Fix api header highlight (#1149)
Browse files Browse the repository at this point in the history
* add apidataslug to path

* add changeset

* update changeset

* Update apps/nextjs-website/src/app/[productSlug]/api/[apiDataSlug]/page.tsx

Co-authored-by: marcobottaro <[email protected]>

* Update .changeset/old-plums-joke.md

Co-authored-by: marcobottaro <[email protected]>

---------

Co-authored-by: marcobottaro <[email protected]>
  • Loading branch information
MarBert and marcobottaro authored Sep 25, 2024
1 parent 422b067 commit 695f025
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/old-plums-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": patch
---

Fix product layout path for Api page
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ export const generateMetadata = async (
const ApiDataPage = async ({ params }: ApiDataParams) => {
const apiDataProps = await getApiData(params.apiDataSlug);
const product = await getProduct(params.productSlug);
const path = product?.path + '/api/' + params.apiDataSlug;

if (apiDataProps && product) {
return (
<ProductLayout
product={product}
path={product.path.concat('/api')}
path={path}
bannerLinks={product.bannerLinks || apiDataProps.bannerLinks}
showBreadcrumbs
>
Expand Down

0 comments on commit 695f025

Please sign in to comment.