MCPcopy Create free account
hub / github.com/KartikLabhshetwar/foliox / GitHubLoginButton

Function GitHubLoginButton

components/auth/github-login-button.tsx:7–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { Button } from "@/components/ui/button";
6
7export function GitHubLoginButton() {
8 const { data: session } = useSession();
9
10 if (session?.user) {
11 return null;
12 }
13
14 const handleLogin = async () => {
15 await signIn.social({
16 provider: "github",
17 });
18 };
19
20 return (
21 <Button
22 onClick={handleLogin}
23 variant="outline"
24 size="sm"
25 className="gap-2 rounded-full"
26 >
27 <FaGithub className="h-4 w-4" />
28 <span className="hidden sm:inline">Sign in with GitHub</span>
29 <span className="sm:hidden">Sign in</span>
30 </Button>
31 );
32}
33

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected