27 lines
641 B
TypeScript
27 lines
641 B
TypeScript
|
"use client"
|
||
|
|
||
|
import { signIn } from "next-auth/react"
|
||
|
import { FaTwitch } from "react-icons/fa"
|
||
|
import { Button } from "@/components/ui/button"
|
||
|
import { DEFAULT_REDIRECT } from "@/routes"
|
||
|
|
||
|
export const Social = () => {
|
||
|
const onClick = (provider: "twitch") => {
|
||
|
signIn(provider, {
|
||
|
callbackUrl: DEFAULT_REDIRECT,
|
||
|
})
|
||
|
}
|
||
|
|
||
|
return (
|
||
|
<div className="flex items-center w-full gap-x-2">
|
||
|
<Button
|
||
|
size="lg"
|
||
|
variant="outline"
|
||
|
className="w-full bg-white hover:bg-purple-500"
|
||
|
onClick={() => onClick("twitch")}
|
||
|
>
|
||
|
<FaTwitch className="h-5 w-5" />
|
||
|
</Button>
|
||
|
</div>
|
||
|
)
|
||
|
}
|