From a98db52bf4a704524d1c1a87caa5cd3fac57fdac Mon Sep 17 00:00:00 2001 From: bkellam Date: Thu, 26 Sep 2024 11:19:04 -0700 Subject: [PATCH] Fix build --- src/app/search/page.tsx | 8 +------- src/app/searchBar.tsx | 2 +- src/lib/types.ts | 4 ++++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/app/search/page.tsx b/src/app/search/page.tsx index ce0981e6..eddd0057 100644 --- a/src/app/search/page.tsx +++ b/src/app/search/page.tsx @@ -21,18 +21,12 @@ import { SettingsDropdown } from "../settingsDropdown"; import useCaptureEvent from "@/hooks/useCaptureEvent"; import { CodePreviewPanel } from "./components/codePreviewPanel"; import { SearchResultsPanel } from "./components/searchResultsPanel"; -import { SearchResultFile } from "@/lib/types"; +import { SearchQueryParams, SearchResultFile } from "@/lib/types"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Scrollbar } from "@radix-ui/react-scroll-area"; const DEFAULT_MAX_MATCH_DISPLAY_COUNT = 200; -export enum SearchQueryParams { - query = "query", - maxMatchDisplayCount = "maxMatchDisplayCount", -} - - export default function SearchPage() { const router = useRouter(); const searchQuery = useNonEmptyQueryParam(SearchQueryParams.query) ?? ""; diff --git a/src/app/searchBar.tsx b/src/app/searchBar.tsx index fc3f2fd1..ffb2a3d1 100644 --- a/src/app/searchBar.tsx +++ b/src/app/searchBar.tsx @@ -16,7 +16,7 @@ import { useForm } from "react-hook-form"; import { z } from "zod"; import { useHotkeys } from 'react-hotkeys-hook' import { useRef } from "react"; -import { SearchQueryParams } from "./search/page"; +import { SearchQueryParams } from "@/lib/types"; interface SearchBarProps { className?: string; diff --git a/src/lib/types.ts b/src/lib/types.ts index e9cfdbd9..a1652379 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -17,3 +17,7 @@ export type ListRepositoriesResponse = z.infer; export type SearchRequest = z.infer; +export enum SearchQueryParams { + query = "query", + maxMatchDisplayCount = "maxMatchDisplayCount", +} \ No newline at end of file