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">
|
<div className="section__actions--between">
|
||||||
<Button button="secondary" onClick={onBack} label={__('Back')} />
|
<Button button="secondary" onClick={onBack} label={__('Back')} />
|
||||||
<Button
|
<Button
|
||||||
button="primary"
|
button={subscribedChannels.length < 1 ? 'alt' : 'primary'}
|
||||||
type="Submit"
|
|
||||||
onClick={onContinue}
|
onClick={onContinue}
|
||||||
label={__('Continue')}
|
label={subscribedChannels.length < 1 ? __('Skip') : __('Continue')}
|
||||||
disabled={subscribedChannels.length < 1}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="section__body">
|
<div className="section__body">
|
||||||
|
|
|
@ -26,11 +26,9 @@ function UserTagFollowIntro(props: Props) {
|
||||||
<div className="section__actions--between">
|
<div className="section__actions--between">
|
||||||
<span />
|
<span />
|
||||||
<Button
|
<Button
|
||||||
button="primary"
|
button={followedTags.length < 1 ? 'alt' : 'primary'}
|
||||||
type="Submit"
|
|
||||||
onClick={onContinue}
|
onClick={onContinue}
|
||||||
label={__('Continue')}
|
label={followedTags.length < 1 ? __('Skip') : __('Continue')}
|
||||||
disabled={followedTags.length < 1}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
@ -43,8 +43,13 @@ export default function YoutubeSync(props: Props) {
|
||||||
const hasYoutubeChannels = youtubeChannels && youtubeChannels.length > 0;
|
const hasYoutubeChannels = youtubeChannels && youtubeChannels.length > 0;
|
||||||
|
|
||||||
React.useEffect(() => {
|
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(() => {
|
React.useEffect(() => {
|
||||||
if (statusToken && !hasYoutubeChannels) {
|
if (statusToken && !hasYoutubeChannels) {
|
||||||
|
|
Loading…
Reference in a new issue