mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
* init * Update component-preview.tsx * please note: changed redirects in block, so need to update the logic to find and replace the redirects * Fix the redirect urls to work when installing and in examples. * Revert some of the changes. * Add a step when building the registry to clean the registry of example code. * Fix the clean registry script. --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
23 lines
517 B
TypeScript
23 lines
517 B
TypeScript
'use client'
|
|
|
|
import { Button } from '@/registry/default/components/ui/button'
|
|
import { createClient } from '@/registry/default/clients/nextjs/lib/supabase/client'
|
|
import { useRouter } from 'next/navigation'
|
|
|
|
export function SignOutButton() {
|
|
const supabase = createClient()
|
|
const router = useRouter()
|
|
|
|
return (
|
|
<Button
|
|
variant="outline"
|
|
onClick={() => {
|
|
supabase.auth.signOut()
|
|
router.push('/example/password-based-auth/login')
|
|
}}
|
|
>
|
|
Sign out
|
|
</Button>
|
|
)
|
|
}
|