add scroll to top when switching board

This commit is contained in:
plebeius.eth
2023-07-14 14:32:33 +02:00
parent 37d64682b1
commit 80edd688da
10 changed files with 35 additions and 35 deletions
@@ -344,9 +344,9 @@ const SubscriptionsCatalog = () => {
<>
<span className="boardList">
[
<Link to={`/p/all`}>All</Link>
<Link to={`/p/all`} onClick={() => window.scrollTo(0, 0)}>All</Link>
 / 
<Link to={`/p/subscriptions`}>Subscriptions</Link>
<Link to={`/p/subscriptions`} onClick={() => window.scrollTo(0, 0)}>Subscriptions</Link>
]&nbsp;[
{defaultSubplebbits.map((subplebbit, index) => (
<span className="boardList" key={`span-${subplebbit.address}`}>
@@ -689,7 +689,7 @@ const SubscriptionsCatalog = () => {
<>
<span className="boardList">
[
<Link to={`/p/subscriptions`}>Subscriptions</Link>
<Link to={`/p/subscriptions`} onClick={() => window.scrollTo(0, 0)}>Subscriptions</Link>
]&nbsp;[
{defaultSubplebbits.map((subplebbit, index) => (
<span className="boardList" key={`span-${subplebbit.address}`}>