Skip to content

Commit 37d52f0

Browse files
Jag96OSBotify
authored and
OSBotify
committed
Merge pull request #5913 from rushatgabhane/fix-5912
Fix - Log in - Promo Colors are changing each time the user writes a new character for new password (cherry picked from commit ebf2c53)
1 parent 981871f commit 37d52f0

File tree

1 file changed

+43
-44
lines changed

1 file changed

+43
-44
lines changed

src/pages/signin/SignInPageLayout/SignInPageLayoutWide.js

+43-44
Original file line numberDiff line numberDiff line change
@@ -26,56 +26,55 @@ const propTypes = {
2626
...withLocalizePropTypes,
2727
};
2828

29-
const SignInPageLayoutWide = (props) => {
30-
const backgroundStyles = [styles.backgroundBlue, styles.backgroundGreen, styles.backgroundOrange, styles.backgroundPink];
31-
const backgroundStyle = backgroundStyles[_.random(0, 3)];
32-
return (
33-
<View style={[styles.flex1, styles.signInPageInner]}>
34-
<View style={[styles.flex1, styles.flexRow, styles.dFlex, styles.flexGrow1]}>
35-
<View style={[styles.signInPageWideLeftContainer, styles.dFlex, styles.flexColumn, styles.ph6]}>
36-
<View style={[
37-
styles.flex1,
38-
styles.dFlex,
39-
styles.flexColumn,
40-
styles.mt40Percentage,
41-
styles.signInPageFormContainer,
42-
styles.alignSelfCenter,
43-
]}
44-
>
45-
<View style={[styles.flex1]}>
46-
<View style={[styles.signInPageLogo, styles.mt6, styles.mb5]}>
47-
<ExpensifyCashLogo
48-
width={variables.componentSizeLarge}
49-
height={variables.componentSizeLarge}
50-
/>
51-
</View>
52-
{props.shouldShowWelcomeText && (
53-
<Text style={[styles.mv5, styles.textLabel, styles.h3]}>
54-
{props.welcomeText}
55-
</Text>
56-
)}
57-
<View>
58-
{props.children}
59-
</View>
29+
const backgroundStyles = [styles.backgroundBlue, styles.backgroundGreen, styles.backgroundOrange, styles.backgroundPink];
30+
const backgroundStyle = backgroundStyles[_.random(0, 3)];
31+
32+
const SignInPageLayoutWide = props => (
33+
<View style={[styles.flex1, styles.signInPageInner]}>
34+
<View style={[styles.flex1, styles.flexRow, styles.dFlex, styles.flexGrow1]}>
35+
<View style={[styles.signInPageWideLeftContainer, styles.dFlex, styles.flexColumn, styles.ph6]}>
36+
<View style={[
37+
styles.flex1,
38+
styles.dFlex,
39+
styles.flexColumn,
40+
styles.mt40Percentage,
41+
styles.signInPageFormContainer,
42+
styles.alignSelfCenter,
43+
]}
44+
>
45+
<View style={[styles.flex1]}>
46+
<View style={[styles.signInPageLogo, styles.mt6, styles.mb5]}>
47+
<ExpensifyCashLogo
48+
width={variables.componentSizeLarge}
49+
height={variables.componentSizeLarge}
50+
/>
6051
</View>
61-
<View style={[styles.mv5]}>
62-
<TermsAndLicenses />
52+
{props.shouldShowWelcomeText && (
53+
<Text style={[styles.mv5, styles.textLabel, styles.h3]}>
54+
{props.welcomeText}
55+
</Text>
56+
)}
57+
<View>
58+
{props.children}
6359
</View>
6460
</View>
61+
<View style={[styles.mv5]}>
62+
<TermsAndLicenses />
63+
</View>
6564
</View>
66-
<View style={[
67-
styles.flexGrow1,
68-
styles.dFlex,
69-
styles.flexRow,
70-
styles.background100,
71-
backgroundStyle,
72-
props.isMediumScreenWidth && styles.alignItemsCenter,
73-
]}
74-
/>
7565
</View>
66+
<View style={[
67+
styles.flexGrow1,
68+
styles.dFlex,
69+
styles.flexRow,
70+
styles.background100,
71+
backgroundStyle,
72+
props.isMediumScreenWidth && styles.alignItemsCenter,
73+
]}
74+
/>
7675
</View>
77-
);
78-
};
76+
</View>
77+
);
7978

8079
SignInPageLayoutWide.propTypes = propTypes;
8180
SignInPageLayoutWide.displayName = 'SignInPageLayoutWide';

0 commit comments

Comments
 (0)