From 299301b6332a2d2c8a2da1e0ddd402d0d94da45c Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 16 Sep 2020 14:01:16 -0400 Subject: [PATCH] make channel/tag follow intro optional --- ui/component/userChannelFollowIntro/view.jsx | 6 ++---- ui/component/userTagFollowIntro/view.jsx | 6 ++---- ui/page/youtubeSync/view.jsx | 9 +++++++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ui/component/userChannelFollowIntro/view.jsx b/ui/component/userChannelFollowIntro/view.jsx index 122c5313c..3f02ce4bb 100644 --- a/ui/component/userChannelFollowIntro/view.jsx +++ b/ui/component/userChannelFollowIntro/view.jsx @@ -46,11 +46,9 @@ function UserChannelFollowIntro(props: Props) {
diff --git a/ui/component/userTagFollowIntro/view.jsx b/ui/component/userTagFollowIntro/view.jsx index f69bec9af..6db31a0bd 100644 --- a/ui/component/userTagFollowIntro/view.jsx +++ b/ui/component/userTagFollowIntro/view.jsx @@ -26,11 +26,9 @@ function UserTagFollowIntro(props: Props) {
diff --git a/ui/page/youtubeSync/view.jsx b/ui/page/youtubeSync/view.jsx index 595df7051..c4ce907bf 100644 --- a/ui/page/youtubeSync/view.jsx +++ b/ui/page/youtubeSync/view.jsx @@ -43,8 +43,13 @@ export default function YoutubeSync(props: Props) { const hasYoutubeChannels = youtubeChannels && youtubeChannels.length > 0; React.useEffect(() => { - replace(`?reset_scroll=youtube`); - }, []); + const urlParamsInEffect = new URLSearchParams(search); + if (!urlParamsInEffect.get('reset_scroll')) { + urlParamsInEffect.append('reset_scroll', 'youtube'); + } + + replace(`?${urlParamsInEffect.toString()}`); + }, [pathname, search]); React.useEffect(() => { if (statusToken && !hasYoutubeChannels) {