Merge pull request #5391 from LLK/fix-intro-when-logged-in

fix logic for when to show intro to users
This commit is contained in:
chrisgarrity 2021-05-13 09:35:32 -04:00 committed by GitHub
commit 132cf487f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,6 +165,13 @@ class Splash extends React.Component {
shouldShowHOCMiddleBanner () {
return false; // we did not use this middle banner in last HoC
}
shouldShowIntro () {
return (
this.props.sessionStatus === sessionActions.Status.FETCHED && // done fetching session
Object.keys(this.props.user).length === 0 && // no user session found
this.shouldShowHOCTopBanner() !== true
);
}
shouldShowDonateBanner () {
return (
this.state.dismissedDonateBanner === false &&
@ -180,7 +187,7 @@ class Splash extends React.Component {
const showDonateBanner = this.shouldShowDonateBanner() || false;
const showHOCTopBanner = this.shouldShowHOCTopBanner() || false;
const showHOCMiddleBanner = this.shouldShowHOCMiddleBanner() || false;
const showIntro = showHOCTopBanner !== true;
const showIntro = this.shouldShowIntro() || false;
const showWelcome = this.shouldShowWelcome();
const homepageRefreshStatus = this.getHomepageRefreshStatus();