mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 02:45:07 +03:00
* Migrate database-new to use server actions. * Revert the package-lock.json changes, leftover from a rebased commit. * Add server actions config back * Cleanup * Cleanup * Undo --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> Co-authored-by: Terry Sutton <saltcod@gmail.com>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import HeaderActions from './HeaderActions'
|
|
import { createClient } from '@/lib/supabase/server'
|
|
import { cookies } from 'next/headers'
|
|
import CurrentThreadName from './CurrentThreadName'
|
|
import Link from 'next/link'
|
|
import UserDropdown from './UserDropdown'
|
|
|
|
const Header = async () => {
|
|
const cookieStore = cookies()
|
|
const supabase = createClient(cookieStore)
|
|
|
|
const {
|
|
data: { user },
|
|
} = await supabase.auth.getUser()
|
|
|
|
return (
|
|
<nav
|
|
role="navigation"
|
|
className="bg-background border flex items-center justify-between px-4 min-h-[50px]"
|
|
>
|
|
<div className="flex items-center gap-x-4">
|
|
<Link href="/">
|
|
<div className="flex items-center gap-x-1.5 font-mono">
|
|
<span>database</span>
|
|
<div className="w-1.5 h-1.5 rounded-full bg-dbnew"></div>
|
|
<span>design</span>
|
|
</div>
|
|
</Link>
|
|
|
|
<CurrentThreadName />
|
|
</div>
|
|
<div className="flex gap-3">
|
|
<HeaderActions user={user} />
|
|
<UserDropdown />
|
|
</div>
|
|
</nav>
|
|
)
|
|
}
|
|
|
|
export default Header
|