Files
formbricks/apps/web/components/auth/GoogleButton.tsx
Johannes c6aabc77b4 Revamp sign up page (#288)
* New cleaner signup/login screen
2023-05-19 12:08:24 +02:00

27 lines
595 B
TypeScript

"use client";
import { Button } from "@formbricks/ui";
import { signIn } from "next-auth/react";
import { FaGoogle } from "react-icons/fa";
export const GoogleButton = ({ text = "Continue with Google" }) => {
const handleLogin = async () => {
await signIn("google", {
redirect: true,
callbackUrl: "/", // redirect after login to /
});
};
return (
<Button
type="button"
EndIcon={FaGoogle}
startIconClassName="ml-3"
onClick={handleLogin}
variant="secondary"
className="w-full justify-center">
{text}
</Button>
);
};