Site için geliştirmeler yapıldı.
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import Link from "next/link"
|
||||
import { Search, Menu, Phone } from "lucide-react"
|
||||
import { Search, Menu, Phone, LogIn, User } from "lucide-react"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { createClient } from "@/lib/supabase-server"
|
||||
|
||||
export async function Navbar() {
|
||||
const supabase = createClient()
|
||||
const { data: { user } } = await supabase.auth.getUser()
|
||||
|
||||
export function Navbar() {
|
||||
return (
|
||||
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
||||
<div className="container flex h-16 items-center">
|
||||
@@ -79,6 +83,21 @@ export function Navbar() {
|
||||
<Button size="sm" className="hidden md:flex">
|
||||
Teklif Al
|
||||
</Button>
|
||||
{user ? (
|
||||
<Button size="sm" variant="ghost" className="h-9 w-9 px-0" asChild>
|
||||
<Link href="/dashboard">
|
||||
<User className="h-4 w-4" />
|
||||
<span className="sr-only">Hesabım</span>
|
||||
</Link>
|
||||
</Button>
|
||||
) : (
|
||||
<Button size="sm" variant="ghost" className="h-9 w-9 px-0" asChild>
|
||||
<Link href="/login">
|
||||
<LogIn className="h-4 w-4" />
|
||||
<span className="sr-only">Giriş Yap</span>
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user