Closed nicosampler closed 3 months ago
Latest commit: bcb5f06fc58e2b0bba00979337020ddd0f32d3eb
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
CI is running/has finished running commands for commit bcb5f06fc58e2b0bba00979337020ddd0f32d3eb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud.
This PR prevents doing a page reload when a new method is selected in the interact section.
Every method was a <Nextjs/Link> component, when the user clicked it a page reload was triggered by concatenating a
#
to the URL and adding the method selector.In this PR, the Link was replaced with a button and the onclick event updates the URL in shallow mode. Also, the positioning of the scroll to visualize the method selected was calculated by hand. There was an issue when more than one method box was opened, as the logic didn't consider the height of the opened elements. Now a lib called `react-scroll was added to handle this behavior.