8000 feat(GCOM-1577): show product name and link on PDP breadcrumbs by FrankHarland · Pull Request #2506 · graphcommerce-org/graphcommerce · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

feat(GCOM-1577): show product name and link on PDP breadcrumbs #2506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/red-boxes-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphcommerce/magento-product": patch
---

feat(GCOM-1577): show product name and link on PDP breadcrumbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { usePrevPageRouter } from '@graphcommerce/framer-next-pages'
import { categoryToBreadcrumbs } from '@graphcommerce/magento-category'
// The magento-product MAY NOT depend on magento-category else plugin loading order breaks.
// eslint-disable-next-line import/no-extraneous-dependencies
import { categoryToBreadcrumbs } from '@graphcommerce/magento-category/components/CategoryBreadcrumb/categoryToBreadcrumbs'
import { Breadcrumbs } from '@graphcommerce/next-ui'
import { BreadcrumbsJsonLd } from '@graphcommerce/next-ui/Breadcrumbs/BreadcrumbsJsonLd'
import { jsonLdBreadcrumb } from '@graphcommerce/next-ui/Breadcrumbs/jsonLdBreadcrumb'
Expand Down Expand Up @@ -34,7 +36,13 @@ export function ProductPageBreadcrumbs(props: ProductPageBreadcrumbsProps) {
breadcrumbs={[...breadcrumbs, { name: product.name, href: productLink(product) }]}
render={(bc) => ({ '@context': 'https://schema.org', ...jsonLdBreadcrumb(bc, router) })}
/>
<Breadcrumbs breadcrumbs={breadcrumbs} lastIsLink {...breadcrumbsProps} />
<Breadcrumbs
breadcrumbs={[
...breadcrumbs,
{ name: product.name, href: productLink(product), sx: { fontWeight: 600 } },
]}
{...breadcrumbsProps}
/>
</>
)
}
Loading
0