2024-04-09 00:26:22 -04:00
|
|
|
import Image from "next/image"
|
|
|
|
import Logo from "@/assets/logo.svg"
|
|
|
|
import { Pencil } from "lucide-react"
|
2024-04-11 05:14:10 -04:00
|
|
|
import Link from "next/link"
|
2024-04-27 00:28:00 -04:00
|
|
|
import { Sandbox, User } from "@/lib/types"
|
2024-04-18 15:32:27 -04:00
|
|
|
import UserButton from "@/components/ui/userButton"
|
2024-04-08 23:40:42 -04:00
|
|
|
|
2024-04-27 00:28:00 -04:00
|
|
|
export default function Navbar({
|
|
|
|
userData,
|
|
|
|
sandboxData,
|
|
|
|
}: {
|
|
|
|
userData: User
|
|
|
|
sandboxData: Sandbox
|
|
|
|
}) {
|
2024-04-08 23:40:42 -04:00
|
|
|
return (
|
2024-04-09 00:26:22 -04:00
|
|
|
<div className="h-14 px-2 w-full flex items-center justify-between border-b border-border">
|
|
|
|
<div className="flex items-center space-x-4">
|
2024-04-11 05:14:10 -04:00
|
|
|
<Link
|
|
|
|
href="/"
|
|
|
|
className="ring-offset-2 ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none rounded-sm"
|
|
|
|
>
|
2024-04-09 00:26:22 -04:00
|
|
|
<Image src={Logo} alt="Logo" width={36} height={36} />
|
2024-04-11 05:14:10 -04:00
|
|
|
</Link>
|
2024-04-09 00:26:22 -04:00
|
|
|
<div className="text-sm font-medium flex items-center">
|
2024-04-27 00:28:00 -04:00
|
|
|
{sandboxData.name}
|
2024-04-11 03:34:58 -04:00
|
|
|
<div className="h-7 w-7 ml-2 flex items-center justify-center transition-colors bg-transparent hover:bg-muted-foreground/25 cursor-pointer rounded-md">
|
2024-04-09 00:26:22 -04:00
|
|
|
<Pencil className="w-4 h-4" />
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-08 23:40:42 -04:00
|
|
|
</div>
|
2024-04-18 15:32:27 -04:00
|
|
|
<UserButton userData={userData} />
|
2024-04-08 23:40:42 -04:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|