Web: Login: fix show social buttons

This commit is contained in:
Viktor Fomin 2022-01-28 02:27:02 +03:00
parent 429266b5e5
commit 03512706f0

View File

@ -80,7 +80,10 @@ const LoginContainer = styled.div`
.more-label { .more-label {
padding-top: 18px; padding-top: 18px;
padding-bottom: 35px; }
.or-label {
padding-top: 35px;
} }
.auth-form-container { .auth-form-container {
@ -411,6 +414,7 @@ const Form = (props) => {
providers && providers &&
providers.map((item, index) => { providers.map((item, index) => {
if (!providersData[item.provider]) return; if (!providersData[item.provider]) return;
if (index > 1) return;
const { icon, label, iconOptions, className } = providersData[ const { icon, label, iconOptions, className } = providersData[
item.provider item.provider
@ -467,18 +471,22 @@ const Form = (props) => {
{oauthDataExists() && ( {oauthDataExists() && (
<> <>
<ButtonsWrapper>{providerButtons()}</ButtonsWrapper> <ButtonsWrapper>{providerButtons()}</ButtonsWrapper>
<Link {providers && providers.length > 2 && (
isHovered <Link
type="action" isHovered
fontSize="13px" type="action"
fontWeight="600" fontSize="13px"
color="#3B72A7" fontWeight="600"
className="more-label" color="#3B72A7"
onClick={moreAuthOpen} className="more-label"
> onClick={moreAuthOpen}
{t("ShowMore")} >
</Link> {t("ShowMore")}
<Text color="#A3A9AE">{t("Or")}</Text> </Link>
)}
<Text color="#A3A9AE" className="or-label">
{t("Or")}
</Text>
</> </>
)} )}
@ -544,6 +552,7 @@ const Form = (props) => {
visible={moreAuthVisible} visible={moreAuthVisible}
onClose={moreAuthClose} onClose={moreAuthClose}
providers={providers} providers={providers}
onSocialLoginClick={onSocialButtonClick}
/> />
</LoginContainer> </LoginContainer>
); );