From 0af23308e840650daff1c23ede8964b41f58cf33 Mon Sep 17 00:00:00 2001 From: sphinxrave <62570796+sphinxrave@users.noreply.github.com> Date: Thu, 26 Oct 2023 21:33:08 -0700 Subject: [PATCH] search bar finished --- .../react/src/components/header/header.tsx | 4 +- .../src/components/header/searchbar/README.md | 118 ------------------ .../components/AutocompleteDropdownItem.tsx | 65 ++++++++++ .../searchbar/{ => components}/QueryBadge.tsx | 35 +++++- .../searchbar/{ => components}/SearchBar.tsx | 94 +++++++------- .../useAutocomplete.tsx} | 4 +- .../{ => hooks}/useClientAutocomplete.tsx | 4 +- .../{ => hooks}/useServerAutocomplete.tsx | 2 +- packages/react/src/shadcn/ui/command.tsx | 2 +- 9 files changed, 150 insertions(+), 178 deletions(-) delete mode 100644 packages/react/src/components/header/searchbar/README.md create mode 100644 packages/react/src/components/header/searchbar/components/AutocompleteDropdownItem.tsx rename packages/react/src/components/header/searchbar/{ => components}/QueryBadge.tsx (50%) rename packages/react/src/components/header/searchbar/{ => components}/SearchBar.tsx (56%) rename packages/react/src/components/header/searchbar/{SearchBarAtoms.tsx => hooks/useAutocomplete.tsx} (96%) rename packages/react/src/components/header/searchbar/{ => hooks}/useClientAutocomplete.tsx (96%) rename packages/react/src/components/header/searchbar/{ => hooks}/useServerAutocomplete.tsx (96%) diff --git a/packages/react/src/components/header/header.tsx b/packages/react/src/components/header/header.tsx index 7624784c4..9716a47ba 100644 --- a/packages/react/src/components/header/header.tsx +++ b/packages/react/src/components/header/header.tsx @@ -13,7 +13,7 @@ import { DropdownMenuItem, } from "@/shadcn/ui/dropdown-menu"; import { useAuth } from "@/hooks/useAuth"; -import { SearchBar } from "./searchbar/SearchBar"; +import { SearchBar } from "./searchbar/components/SearchBar"; interface HeaderProps extends React.DetailedHTMLProps< @@ -41,7 +41,7 @@ export function Header({ id }: HeaderProps) {
-