Move to clerk
This commit is contained in:
parent
cd340320b7
commit
567b0ac313
18 changed files with 550 additions and 178 deletions
|
|
@ -1,11 +1,11 @@
|
|||
'use client'
|
||||
|
||||
import * as React from 'react'
|
||||
import { signIn } from '@auth/nextjs/client'
|
||||
|
||||
import { cn } from '@/lib/utils'
|
||||
import { Button, type ButtonProps } from '@/components/ui/button'
|
||||
import { IconGitHub, IconSpinner } from '@/components/ui/icons'
|
||||
import { useClerk } from '@clerk/nextjs'
|
||||
|
||||
interface LoginButtonProps extends ButtonProps {
|
||||
text?: string
|
||||
|
|
@ -17,13 +17,14 @@ export function LoginButton({
|
|||
...props
|
||||
}: LoginButtonProps) {
|
||||
const [isLoading, setIsLoading] = React.useState(false)
|
||||
const clerk = useClerk()
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
setIsLoading(true)
|
||||
signIn('github')
|
||||
clerk.openSignIn({})
|
||||
}}
|
||||
disabled={isLoading}
|
||||
className={cn(className)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue