fix: reset password banner image changed (#420)

In addition to the check for authenticated user, added a welcome
banner check to restrict the welcome banner for only progressive
profiling page.

VAN-688
This commit is contained in:
Zainab Amir
2021-08-12 18:26:05 +05:00
committed by GitHub
parent 68cc93da1c
commit 1de911122a
2 changed files with 8 additions and 3 deletions

View File

@@ -17,8 +17,8 @@ import AuthExtraLargeLayout from './AuthExtraLargeLayout';
import AuthMediumLayout from './AuthMediumLayout';
import AuthSmallLayout from './AuthSmallLayout';
const BaseComponent = ({ children }) => {
const authenticatedUser = getAuthenticatedUser();
const BaseComponent = ({ children, showWelcomeBanner }) => {
const authenticatedUser = showWelcomeBanner ? getAuthenticatedUser() : null;
return (
<>
@@ -62,8 +62,13 @@ const BaseComponent = ({ children }) => {
);
};
BaseComponent.defaultProps = {
showWelcomeBanner: false,
};
BaseComponent.propTypes = {
children: PropTypes.node.isRequired,
showWelcomeBanner: PropTypes.bool,
};
export default BaseComponent;

View File

@@ -122,7 +122,7 @@ const WelcomePage = (props) => {
return (
<>
<BaseComponent>
<BaseComponent showWelcomeBanner>
<Helmet>
<title>{intl.formatMessage(messages['progressive.profiling.page.title'],
{ siteName: getConfig().SITE_NAME })}