Skip to content

Commit

Permalink
Conditional welcome message on mobile layout
Browse files Browse the repository at this point in the history
  • Loading branch information
MonilBhavsar committed Sep 7, 2021
1 parent 2211940 commit 8f850b1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pages/signin/SignInPageLayout/SignInPageLayoutNarrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const propTypes = {
* on form type (set password, sign in, etc.) */
welcomeText: PropTypes.string.isRequired,

shouldShowWelcomeText: PropTypes.bool.isRequired,

...withLocalizePropTypes,
};

Expand Down Expand Up @@ -47,9 +49,11 @@ const SignInPageLayoutNarrow = props => (
height={variables.componentSizeLarge}
/>
</View>
<Text style={[styles.mv5, styles.textLabel, styles.h3]}>
{props.welcomeText}
</Text>
{props.shouldShowWelcomeText && (
<Text style={[styles.mv5, styles.textLabel, styles.h3]}>
{props.welcomeText}
</Text>
)}
{props.children}
</View>
</View>
Expand Down

0 comments on commit 8f850b1

Please sign in to comment.