Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Log in - Promo Colors are changing each time the user writes a new character for new password #5913

Merged
merged 1 commit into from
Oct 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 43 additions & 44 deletions src/pages/signin/SignInPageLayout/SignInPageLayoutWide.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,56 +26,55 @@ const propTypes = {
...withLocalizePropTypes,
};

const SignInPageLayoutWide = (props) => {
const backgroundStyles = [styles.backgroundBlue, styles.backgroundGreen, styles.backgroundOrange, styles.backgroundPink];
const backgroundStyle = backgroundStyles[_.random(0, 3)];
return (
<View style={[styles.flex1, styles.signInPageInner]}>
<View style={[styles.flex1, styles.flexRow, styles.dFlex, styles.flexGrow1]}>
<View style={[styles.signInPageWideLeftContainer, styles.dFlex, styles.flexColumn, styles.ph6]}>
<View style={[
styles.flex1,
styles.dFlex,
styles.flexColumn,
styles.mt40Percentage,
styles.signInPageFormContainer,
styles.alignSelfCenter,
]}
>
<View style={[styles.flex1]}>
<View style={[styles.signInPageLogo, styles.mt6, styles.mb5]}>
<ExpensifyCashLogo
width={variables.componentSizeLarge}
height={variables.componentSizeLarge}
/>
</View>
{props.shouldShowWelcomeText && (
<Text style={[styles.mv5, styles.textLabel, styles.h3]}>
{props.welcomeText}
</Text>
)}
<View>
{props.children}
</View>
const backgroundStyles = [styles.backgroundBlue, styles.backgroundGreen, styles.backgroundOrange, styles.backgroundPink];
const backgroundStyle = backgroundStyles[_.random(0, 3)];

const SignInPageLayoutWide = props => (
<View style={[styles.flex1, styles.signInPageInner]}>
<View style={[styles.flex1, styles.flexRow, styles.dFlex, styles.flexGrow1]}>
<View style={[styles.signInPageWideLeftContainer, styles.dFlex, styles.flexColumn, styles.ph6]}>
<View style={[
styles.flex1,
styles.dFlex,
styles.flexColumn,
styles.mt40Percentage,
styles.signInPageFormContainer,
styles.alignSelfCenter,
]}
>
<View style={[styles.flex1]}>
<View style={[styles.signInPageLogo, styles.mt6, styles.mb5]}>
<ExpensifyCashLogo
width={variables.componentSizeLarge}
height={variables.componentSizeLarge}
/>
</View>
<View style={[styles.mv5]}>
<TermsAndLicenses />
{props.shouldShowWelcomeText && (
<Text style={[styles.mv5, styles.textLabel, styles.h3]}>
{props.welcomeText}
</Text>
)}
<View>
{props.children}
</View>
</View>
<View style={[styles.mv5]}>
<TermsAndLicenses />
</View>
</View>
<View style={[
styles.flexGrow1,
styles.dFlex,
styles.flexRow,
styles.background100,
backgroundStyle,
props.isMediumScreenWidth && styles.alignItemsCenter,
]}
/>
</View>
<View style={[
styles.flexGrow1,
styles.dFlex,
styles.flexRow,
styles.background100,
backgroundStyle,
props.isMediumScreenWidth && styles.alignItemsCenter,
]}
/>
</View>
);
};
</View>
);

SignInPageLayoutWide.propTypes = propTypes;
SignInPageLayoutWide.displayName = 'SignInPageLayoutWide';
Expand Down