"use client"; import * as React from "react"; import { LogOut } from "lucide-react"; import { cn } from "@/lib/utils"; import type { Me } from "@/lib/api"; import { Badge } from "@/components/ui/badge"; /** * Sticky chrome over scrolling content: search on the left, identity on the * right. Everything that used to be hidden below `sm:` — the quota chip, the * display name — now degrades into the overflow rather than vanishing, since * "how many requests do I have left" matters most on the device you are * actually queueing from. */ export function Toolbar({ me, quotaLeft, children, }: { me: Me | null; quotaLeft: number | null; children?: React.ReactNode; }) { return (
{children}
{me?.user && (
{quotaLeft !== null && ( {quotaLeft} left )} {me.role && me.role !== "user" && ( {me.role} )} {me.avatar && ( /* eslint-disable-next-line @next/next/no-img-element */ )} {me.display || me.user}
)}
); }