Skip to content
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

feat(docs): update stateful tree page to use new layout #609

Merged

Conversation

chanceaclark
Copy link
Contributor

What?

Updates StatefulTree page to use new layout.

Screenshots/Screen Recordings

screencapture-localhost-3000-statefulTree-2021-10-06-16_15_53

Testing/Proof

N/A

@chanceaclark chanceaclark requested review from a team as code owners October 6, 2021 21:18
@@ -10,7 +10,7 @@ export const useContentRoutingTabs = (routes: Route[], id: string) => {
const activeContent = routes.find((content) => content.id === activePill);

const handlePillClick = (pillId: string) => {
push({ query: { ...query, [id]: pillId } }, undefined, { shallow: true });
push({ query: { ...query, [id]: pillId } }, undefined, { scroll: false, shallow: true });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added scroll: false to ensure we don't scroll when switching content.

@@ -12,7 +12,7 @@ function getLinkAs(as = '') {
return prefix + as;
}

export const NextLink: React.FC<{ href: string; as?: string }> = (props) => {
export const NextLink: React.FC<{ href: LinkProps['href']; as?: string }> = (props) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated from #606

@chanceaclark chanceaclark force-pushed the docs/update-stateful-tree branch 2 times, most recently from 279be3a to 792695f Compare October 7, 2021 20:49
@chanceaclark chanceaclark merged commit ba5198a into bigcommerce:master Oct 7, 2021
@chanceaclark chanceaclark deleted the docs/update-stateful-tree branch October 7, 2021 23:00
@chanceaclark chanceaclark added the documenation This issue is in regards to documentation. label Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documenation This issue is in regards to documentation.
Development

Successfully merging this pull request may close these issues.

3 participants