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
Reset bread crumb state functionality #14
Comments
hey @dvlprmartins The second issue seems to work in the demo as well. So either I have a bug that isn't showing itself in the demo, a sandbox would be helpful on tracking this down, or there maybe something wrong in your default crumb structure? Thanks! |
Hello @sbardian |
@sbardian I probably didn't explain my self very well. If you go to Page 2 and refresh the page the breadcrumb will start on the Page 2. Isn't it possible to always keep the same structure Home -> Page 2 or Page 3, no matter where you reloaded your website? |
I see it now! Yes this is not the expected behavior. I will look into this today! |
@sbardian Awesome! Thanks for that! |
@dvlprmartins actually. It may have just been that the sandbox didn't have the latest version of Let me know, are you on the latest release? |
@sbardian Yes I'm on the latest release and It's still happening. |
Hmm. We'll check out the demo, is it working as you expect now? Otherwise maybe share the sandbox and I'll dig deeper. Thanks |
Here is the demo that i think is working how we would expect. I had an error, but seems correct now. |
Indeed that demo works as expected! Here's my sandbox https://codesandbox.io/s/github/dvlprmartins/dvlprmartins Thanks for your help btw! |
Thanks. I will dig into this tonight! |
@dvlprmartins I made a fork of your sandbox (https://codesandbox.io/s/pedro-martins-313ju). Seems there were a couple issues. One was most likely my fault. In the gatsby.config.js you had the same mistake I made updating my sandbox example to use a default crumb. Double nested
The second change I made was how you were using the Breadcrumb component in /components/BackgroundComponent.js lines 24-32. No need to assign this to an array here /etc. Take a look at my fork and let me know what you think and if it is working as you expect. Also, if the docs could be more clear let me know or feel free to submit a PR, either way is great! |
@sbardian Sorry for late reply. I think the docs are clear. But anything that I feel that needs to be more clear I'll definitely make a PR. Want to start contributing to this community. Again thanks! |
I currently have an issue with the breadcrumbs default crumb.
So let's imagine that our default crumb is this one
/writtens
.Inside "writtens" we have our posts, so for example:
/writtens/a-funny-post
.Writtens page is also on my navbar, so I have a that navigates to it.
So this is the behaviour:
If I go to Writtens page and then go to writtens/a-funny-post it will create the expected breadcrumb, so
Writtens/A Funny Post
.But if I now navigate to Writtens from the navbar the breadcrumbs will become
Writtens/A Funny Post/Writtens
. That's the first problem.The second one is if I navigate to "A Funny Post" and then navigate to "Writtens" from the breadcrumb and then navigate to a different post for example "A Mean Post" my breadcrumbs will become
Writtens/A Funny Post/A Mean Post
.Is there a way to whenever I navigate to
/writtens
to clear/reset the breadcrumbs?Thanks!
The text was updated successfully, but these errors were encountered: