feat: google login

This commit is contained in:
Tristan Yang
2022-10-27 23:07:39 +08:00
parent 1987c257ba
commit c08bb8fb13
11 changed files with 89 additions and 53 deletions
+5 -5
View File
@@ -33,7 +33,7 @@ const StyledSocialButton = styled(Button)`
height: 24px;
}
}
.invisible {
> .hide {
/* z-index: 1; */
/* opacity: 0; */
left: 0;
@@ -45,7 +45,7 @@ const StyledSocialButton = styled(Button)`
}
}
&:hover {
.invisible {
.hide {
opacity: 0;
z-index: 999;
}
@@ -92,10 +92,10 @@ const GoogleLoginInner: FC<Props> = ({ type = "login", loaded, loadError }) => {
{loadError
? "Script Load Error!"
: loaded
? `${type === "login" ? "Sign in" : "Sign up"} with Google`
: `Initializing`}
? `${type === "login" ? "Sign in" : "Sign up"} with Google`
: `Initializing`}
</div>
<div className="invisible">
<div className="hide">
<GoogleLogin
width="360px"
onSuccess={(res) => {
+1 -1
View File
@@ -7,7 +7,7 @@ import { GithubAuthConfig } from "../../types/server";
export default function useGithubAuthConfig() {
const [changed, setChanged] = useState(false);
const [config, setConfig] = useState<GithubAuthConfig | undefined>(undefined);
const [config, setConfig] = useState<GithubAuthConfig | undefined>();
const { data } = useGetGithubAuthConfigQuery(undefined, {
refetchOnMountOrArgChange: true
});