mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-28 05:46:58 +02:00
Moved SearchCommand, SearchTrigger, and search store from apps/web/features/ to packages/views/search/. Replaced useRouter (next/navigation) with the existing useNavigation() abstraction. Wired search into desktop layout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
676 B
TypeScript
21 lines
676 B
TypeScript
"use client";
|
|
|
|
import { Search } from "lucide-react";
|
|
import { SidebarMenuButton } from "@multica/ui/components/ui/sidebar";
|
|
import { useSearchStore } from "./search-store";
|
|
|
|
export function SearchTrigger() {
|
|
return (
|
|
<SidebarMenuButton
|
|
className="text-muted-foreground"
|
|
onClick={() => useSearchStore.getState().setOpen(true)}
|
|
>
|
|
<Search />
|
|
<span>Search...</span>
|
|
<kbd className="pointer-events-none ml-auto inline-flex h-5 select-none items-center gap-0.5 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground">
|
|
<span className="text-xs">⌘</span>K
|
|
</kbd>
|
|
</SidebarMenuButton>
|
|
);
|
|
}
|