-
Notifications
You must be signed in to change notification settings - Fork 79
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
fix(core): Fix breadcrumb links on PDP #728
Conversation
🦋 Changeset detectedLatest commit: 5fd5952 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
> | ||
<Link href="#">{breadcrumb.name}</Link> | ||
<Link href={path ?? '#'}>{name}</Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we want to do something more complex here if path
is null, I'm not sure how much of an edge case that is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it doesn't need to be a link if there is no path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I experimented with this, will also involve remove the hover:text-primary
styling above, and I started to wonder if it's worth the complexity (I'm honestly not sure why a category would not have a path)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm honestly not sure why a category would not have a path
Good question, maybe that is something we need to look into at the API level 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed this is an extreme edge case, don't think we need to account for it any more gracefully than this.
What/Why?
The breadcrumb links on the PDP were all pointing to
#
. I've added thepath
field to the getProduct query so that we have the path of each category available to populate the link with.Testing
Verified that the breadcrumb links on the PDP now link to the correct page.