2025-07-14 16:59:59 +01:00
|
|
|
import { SidebarTrigger } from "./ui/sidebar"
|
|
|
|
|
import { Separator } from "./ui/separator"
|
2025-12-11 19:17:37 +00:00
|
|
|
import Search from "@/containers/Search"
|
2025-12-19 17:57:28 +00:00
|
|
|
import { Button } from "./ui/button"
|
|
|
|
|
import { useState } from "react"
|
|
|
|
|
import History from "./History"
|
|
|
|
|
import { HistoryIcon } from "lucide-react"
|
2025-07-14 16:59:59 +01:00
|
|
|
|
2025-12-19 17:57:28 +00:00
|
|
|
export default function AppHeader({
|
|
|
|
|
pageTitle,
|
|
|
|
|
historyOpen,
|
|
|
|
|
setHistoryOpen,
|
|
|
|
|
}: {
|
|
|
|
|
pageTitle: string
|
|
|
|
|
}) {
|
2025-07-14 16:59:59 +01:00
|
|
|
return (
|
|
|
|
|
<header className="sticky top-0 z-10 flex h-12 shrink-0 items-center gap-2 border-b bg-background transition-[width,height] ease-linear">
|
|
|
|
|
<div className="flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6">
|
|
|
|
|
<SidebarTrigger className="-ml-1" />
|
|
|
|
|
<Separator orientation="vertical" className="mx-2 data-[orientation=vertical]:h-4" />
|
2025-12-11 19:17:37 +00:00
|
|
|
<Search />
|
2025-12-19 17:57:28 +00:00
|
|
|
<Button
|
|
|
|
|
variant="outline"
|
|
|
|
|
size="icon"
|
|
|
|
|
className="rounded-none"
|
|
|
|
|
onClick={() => setHistoryOpen(true)}
|
|
|
|
|
>
|
|
|
|
|
<HistoryIcon />
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
<History sheetOpen={historyOpen} setSheetOpen={setHistoryOpen} error={false} />
|
2025-07-14 16:59:59 +01:00
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
)
|
|
|
|
|
}
|