From 80edd688dae0d4fbff597d277052ff2da621ecb9 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 14 Jul 2023 14:32:33 +0200 Subject: [PATCH] add scroll to top when switching board --- src/components/views/All.jsx | 8 ++++---- src/components/views/AllCatalog.jsx | 8 ++++---- src/components/views/Board.jsx | 8 ++++---- src/components/views/Catalog.jsx | 8 ++++---- src/components/views/Description.jsx | 8 ++++---- src/components/views/Pending.jsx | 4 ++-- src/components/views/Rules.jsx | 8 ++++---- src/components/views/Subscriptions.jsx | 4 ++-- src/components/views/SubscriptionsCatalog.jsx | 6 +++--- src/components/views/Thread.jsx | 8 ++++---- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/components/views/All.jsx b/src/components/views/All.jsx index 1d8d542b..c77a4967 100755 --- a/src/components/views/All.jsx +++ b/src/components/views/All.jsx @@ -512,9 +512,9 @@ const All = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( @@ -2258,9 +2258,9 @@ const All = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/AllCatalog.jsx b/src/components/views/AllCatalog.jsx index 9974bd4b..d36f4e3c 100755 --- a/src/components/views/AllCatalog.jsx +++ b/src/components/views/AllCatalog.jsx @@ -348,9 +348,9 @@ const AllCatalog = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( @@ -685,9 +685,9 @@ const AllCatalog = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx index db9c03ff..a1a60c2d 100755 --- a/src/components/views/Board.jsx +++ b/src/components/views/Board.jsx @@ -683,9 +683,9 @@ const Board = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( @@ -2881,9 +2881,9 @@ const Board = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ]  {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx index f45ab3ca..1029164d 100755 --- a/src/components/views/Catalog.jsx +++ b/src/components/views/Catalog.jsx @@ -518,9 +518,9 @@ const Catalog = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( @@ -1130,9 +1130,9 @@ const Catalog = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ]  {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/Description.jsx b/src/components/views/Description.jsx index 4222b788..da70190a 100644 --- a/src/components/views/Description.jsx +++ b/src/components/views/Description.jsx @@ -139,9 +139,9 @@ const Description = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( @@ -446,9 +446,9 @@ const Description = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ]  {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/Pending.jsx b/src/components/views/Pending.jsx index f2f4b07f..9ddbd7f9 100755 --- a/src/components/views/Pending.jsx +++ b/src/components/views/Pending.jsx @@ -123,9 +123,9 @@ const Pending = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/Rules.jsx b/src/components/views/Rules.jsx index 6405d94a..95f3334c 100644 --- a/src/components/views/Rules.jsx +++ b/src/components/views/Rules.jsx @@ -144,9 +144,9 @@ const Rules = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( @@ -443,9 +443,9 @@ const Rules = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ]  {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/Subscriptions.jsx b/src/components/views/Subscriptions.jsx index fc1e81c6..bfafc125 100755 --- a/src/components/views/Subscriptions.jsx +++ b/src/components/views/Subscriptions.jsx @@ -515,9 +515,9 @@ const Subscriptions = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/SubscriptionsCatalog.jsx b/src/components/views/SubscriptionsCatalog.jsx index 964140f8..14304736 100755 --- a/src/components/views/SubscriptionsCatalog.jsx +++ b/src/components/views/SubscriptionsCatalog.jsx @@ -344,9 +344,9 @@ const SubscriptionsCatalog = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( @@ -689,7 +689,7 @@ const SubscriptionsCatalog = () => { <> [ - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx index 178ed2a3..d506380b 100755 --- a/src/components/views/Thread.jsx +++ b/src/components/views/Thread.jsx @@ -613,9 +613,9 @@ const Thread = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ] [ {defaultSubplebbits.map((subplebbit, index) => ( @@ -2204,9 +2204,9 @@ const Thread = () => { <> [ - All + window.scrollTo(0, 0)}>All  /  - Subscriptions + window.scrollTo(0, 0)}>Subscriptions ]  {defaultSubplebbits.map((subplebbit, index) => (