on master help sign in
Update [[...slug]].js

Adds a div + changes the pageTree async function (whatever that is) so that clicking on sidebar items doesn't cause the refresh to go back to the top of the page

commit9b62380980960f0a091f46a284f368ebaad3a04a authorSamuel Henriquez <70870763+humanizersequel@users.noreply.github.com> dateWed 12 Apr 2023, 23:34 (4 years ago) parent66bdf34
1 file changed+2−1
pages/campus/[[...slug]].js+2−1
pages/campus/[[...slug]].js+2−1
@@ -116,6 +116,7 @@ export default function Home({
116116 {
117117 //funnel, repurposed from /overview page:
118118 }
119+ <div id="reading"></div>
119120
120121 <Section>
121122
@@ -234,7 +235,7 @@ const pageTree = (thisLink, tree, level = 0) => {
234235
235236 return (
236237 <>
237− <Link href={thisLink}>
238+ <Link href={thisLink + "#reading"}>
238239 <a className={`${pageItemClasses} cursor-pointer`}>{tree.title}</a>
239240 </Link>
240241 </>