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:
@@ -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;
|
||||
|
||||
@@ -122,7 +122,7 @@ const WelcomePage = (props) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<BaseComponent>
|
||||
<BaseComponent showWelcomeBanner>
|
||||
<Helmet>
|
||||
<title>{intl.formatMessage(messages['progressive.profiling.page.title'],
|
||||
{ siteName: getConfig().SITE_NAME })}
|
||||
|
||||
Reference in New Issue
Block a user