From 1a3f080b8d5829bec3853753da8a10910f30005a Mon Sep 17 00:00:00 2001 From: itsmegood Date: Sun, 18 Feb 2024 23:12:52 +0530 Subject: [PATCH] just commit --- app/components/search-bar.tsx | 58 +-- app/components/ui/dropdown-menu.tsx | 11 +- app/routes/$.tsx | 11 +- app/routes/c.$companyId+/_layout_company.tsx | 5 +- app/routes/c.$companyId+/search.tsx | 447 +++++++++++++++++- .../c.$companyId.sales+/new.$accountId.tsx | 12 +- app/routes/c.$companyId.sales+/new.tsx | 32 -- app/styles/tailwind.css | 2 +- package-lock.json | 139 +++--- package.json | 14 +- 10 files changed, 576 insertions(+), 155 deletions(-) delete mode 100644 app/routes/c.$companyId.sales+/new.tsx diff --git a/app/components/search-bar.tsx b/app/components/search-bar.tsx index 5d49514..a36796d 100644 --- a/app/components/search-bar.tsx +++ b/app/components/search-bar.tsx @@ -14,6 +14,7 @@ export function SearchBar({ onSubmitHandler, className, searchParam, + searchRef, }: { action: string status: 'idle' | 'pending' | 'success' | 'error' @@ -22,6 +23,7 @@ export function SearchBar({ autoSubmit?: boolean className?: string searchParam?: string + searchRef?: React.RefObject }) { const id = useId() const [searchParams] = useSearchParams() @@ -38,38 +40,38 @@ export function SearchBar({ }, 400) return ( -
autoSubmit && handleFormChange(e.currentTarget)} - onSubmit={onSubmitHandler} - > -
- - -
+
+ autoSubmit && handleFormChange(e.currentTarget)} + onSubmit={onSubmitHandler} + > +
+ + +
+ - - Search + + Search + - +
) } diff --git a/app/components/ui/dropdown-menu.tsx b/app/components/ui/dropdown-menu.tsx index 3bb4fe3..6b122dc 100644 --- a/app/components/ui/dropdown-menu.tsx +++ b/app/components/ui/dropdown-menu.tsx @@ -24,7 +24,7 @@ const DropdownMenuSubTrigger = React.forwardRef< Back to home + ), }} diff --git a/app/routes/c.$companyId+/_layout_company.tsx b/app/routes/c.$companyId+/_layout_company.tsx index df744a9..8d124a6 100644 --- a/app/routes/c.$companyId+/_layout_company.tsx +++ b/app/routes/c.$companyId+/_layout_company.tsx @@ -27,7 +27,7 @@ const companyRoutes = [ href: 'reports', }, { - title: 'Search', + title: 'Discover', href: 'search', }, ] @@ -41,7 +41,6 @@ const mobileCompanyRoutes = [ export default function LayoutCompany() { const matches = useMatches() - console.log(matches) const isSearchPage = matches.find(m => m.id === 'routes/c.$companyId+/search') return ( @@ -84,7 +83,7 @@ export default function LayoutCompany() {