diff --git a/src/common/component/Setting/config/SMTP.js b/src/common/component/Setting/config/SMTP.js index 4c5a2e0b..15503c8a 100644 --- a/src/common/component/Setting/config/SMTP.js +++ b/src/common/component/Setting/config/SMTP.js @@ -120,6 +120,7 @@ export default function ConfigSMTP() {
{ + setInputType((prev) => (prev == "password" ? "text" : "password")); + }; + return type == "password" ? ( + + +
+ {inputType == "password" ? ( + + ) : ( + + )} +
+
+ ) : ( + + ); +} + +// export default StyledInput; diff --git a/src/routes/login/GoogleLoginButton.js b/src/routes/login/GoogleLoginButton.js index ba4ac753..b091081d 100644 --- a/src/routes/login/GoogleLoginButton.js +++ b/src/routes/login/GoogleLoginButton.js @@ -2,9 +2,12 @@ import { useGoogleLogin } from "react-google-login"; import { googleClientID } from "../../app/config"; import googleSvg from "../../assets/icons/google.svg?url"; - +import { StyledSocialButton } from "./styled"; export default function GoogleLoginButton({ login }) { const { signIn, loaded } = useGoogleLogin({ + onScriptLoadFailure: (wtf) => { + console.log("google login script load failure", wtf); + }, clientId: googleClientID, onSuccess: ({ tokenId, ...rest }) => { console.log("success", tokenId, rest); @@ -14,21 +17,17 @@ export default function GoogleLoginButton({ login }) { }); }, onFailure: (wtf) => { - console.log("failure", wtf); + console.log("google login failure", wtf); }, }); const handleGoogleLogin = () => { signIn(); }; + console.log("google login ", loaded); return ( - + ); } diff --git a/src/routes/login/MetamaskLoginButton.js b/src/routes/login/MetamaskLoginButton.js index af85f97f..567f4aa9 100644 --- a/src/routes/login/MetamaskLoginButton.js +++ b/src/routes/login/MetamaskLoginButton.js @@ -3,6 +3,8 @@ import { useState, useEffect, useRef } from "react"; import MetaMaskOnboarding from "@metamask/onboarding"; import { useLazyGetMetamaskNonceQuery } from "../../app/services/auth"; import metamaskSvg from "../../assets/icons/metamask.svg?url"; +import { StyledSocialButton } from "./styled"; + export default function MetamaskLoginButton({ login }) { const [requesting, setRequesting] = useState(false); const [getNonce] = useLazyGetMetamaskNonceQuery(); @@ -43,14 +45,13 @@ export default function MetamaskLoginButton({ login }) { } }; return ( - + ); } diff --git a/src/routes/login/SolidLoginButton.js b/src/routes/login/SolidLoginButton.js index c97e68d1..93aec9c1 100644 --- a/src/routes/login/SolidLoginButton.js +++ b/src/routes/login/SolidLoginButton.js @@ -2,6 +2,8 @@ import { useEffect } from "react"; import { useGetOpenidMutation } from "../../app/services/auth"; import solidSvg from "../../assets/icons/solid.svg?url"; +import { StyledSocialButton } from "./styled"; + export default function SolidLoginButton() { const [getOpenId, { data, isLoading, isSuccess }] = useGetOpenidMutation(); @@ -21,14 +23,13 @@ export default function SolidLoginButton() { }, [data, isSuccess]); return ( - + ); } diff --git a/src/routes/login/index.js b/src/routes/login/index.js index fa15122c..1bdb9596 100644 --- a/src/routes/login/index.js +++ b/src/routes/login/index.js @@ -8,7 +8,8 @@ import BASE_URL from "../../app/config"; import StyledWrapper from "./styled"; import MetamaskLoginButton from "./MetamaskLoginButton"; import SolidLoginButton from "./SolidLoginButton"; - +import Input from "../../common/component/styled/Input"; +import Button from "../../common/component/styled/Button"; import GoogleLoginButton from "./GoogleLoginButton"; import { useLoginMutation } from "../../app/services/auth"; import { setAuthData } from "../../app/slices/auth.data"; @@ -96,7 +97,8 @@ export default function LoginPage() { Please enter your details.
- - - +

diff --git a/src/routes/login/styled.js b/src/routes/login/styled.js index 561167ff..796168d3 100644 --- a/src/routes/login/styled.js +++ b/src/routes/login/styled.js @@ -1,4 +1,20 @@ import styled from "styled-components"; +import Button from "../../common/component/styled/Button"; +export const StyledSocialButton = styled(Button)` + width: 100%; + margin-bottom: 16px; + display: flex; + align-items: center; + justify-content: center; + gap: 12px; + color: #344054; + border: 1px solid #d0d5dd; + background: none !important; + .icon { + width: 24px; + height: 24px; + } +`; const StyledWrapper = styled.div` display: flex; justify-content: center; @@ -39,18 +55,7 @@ const StyledWrapper = styled.div` display: flex; flex-direction: column; gap: 20px; - input { - width: 360px; - background: #ffffff; - border: 1px solid #d0d5dd; - box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05); - border-radius: 8px; - padding: 10px 14px; - font-weight: normal; - font-size: 16px; - line-height: 24px; - color: #667085; - } + width: 360px; } .or { border: none; @@ -71,34 +76,6 @@ const StyledWrapper = styled.div` color: #667085; } } - .btn { - display: inline-block; - text-align: center; - width: 100%; - font-weight: 500; - font-size: 16px; - line-height: 24px; - color: #ffffff; - padding: 10px; - background: #1fe1f9; - border: 1px solid #1fe1f9; - box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05); - border-radius: 8px; - &.social { - margin-bottom: 16px; - display: flex; - align-items: center; - justify-content: center; - gap: 12px; - color: #344054; - border-color: #d0d5dd; - background: none; - .icon { - width: 24px; - height: 24px; - } - } - } } `;