mirror of
https://github.com/formbricks/formbricks.git
synced 2026-03-20 17:31:27 -05:00
* simplify ui package, update all packages * fix typescript errors that occur during build
27 lines
601 B
TypeScript
27 lines
601 B
TypeScript
"use client";
|
|
|
|
import { Button } from "@formbricks/ui/Button";
|
|
import { signIn } from "next-auth/react";
|
|
import { FaGithub } from "react-icons/fa";
|
|
|
|
export const GithubButton = ({ text = "Login with Github" }) => {
|
|
const handleLogin = async () => {
|
|
await signIn("github", {
|
|
redirect: true,
|
|
callbackUrl: "/", // redirect after login to /
|
|
});
|
|
};
|
|
|
|
return (
|
|
<Button
|
|
type="button"
|
|
StartIcon={FaGithub}
|
|
startIconClassName="mr-2"
|
|
onClick={handleLogin}
|
|
variant="secondary"
|
|
className="w-full justify-center">
|
|
{text}
|
|
</Button>
|
|
);
|
|
};
|