make channel/tag follow intro optional
This commit is contained in:
parent
4e1076e01b
commit
299301b633
3 changed files with 11 additions and 10 deletions
|
@ -46,11 +46,9 @@ function UserChannelFollowIntro(props: Props) {
|
|||
<div className="section__actions--between">
|
||||
<Button button="secondary" onClick={onBack} label={__('Back')} />
|
||||
<Button
|
||||
button="primary"
|
||||
type="Submit"
|
||||
button={subscribedChannels.length < 1 ? 'alt' : 'primary'}
|
||||
onClick={onContinue}
|
||||
label={__('Continue')}
|
||||
disabled={subscribedChannels.length < 1}
|
||||
label={subscribedChannels.length < 1 ? __('Skip') : __('Continue')}
|
||||
/>
|
||||
</div>
|
||||
<div className="section__body">
|
||||
|
|
|
@ -26,11 +26,9 @@ function UserTagFollowIntro(props: Props) {
|
|||
<div className="section__actions--between">
|
||||
<span />
|
||||
<Button
|
||||
button="primary"
|
||||
type="Submit"
|
||||
button={followedTags.length < 1 ? 'alt' : 'primary'}
|
||||
onClick={onContinue}
|
||||
label={__('Continue')}
|
||||
disabled={followedTags.length < 1}
|
||||
label={followedTags.length < 1 ? __('Skip') : __('Continue')}
|
||||
/>
|
||||
</div>
|
||||
</Form>
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue