Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Scope type

Manav Rathif69760808a1b
diff --git a/web/apps/photos/src/components/SearchBar.tsx b/web/apps/photos/src/components/SearchBar.tsx
index 74b6fe8ad2..1b40e5292b 100644
--- a/web/apps/photos/src/components/SearchBar.tsx
+++ b/web/apps/photos/src/components/SearchBar.tsx
@@ -5,6 +5,7 @@ import type {
City,
SearchDateComponents,
SearchPerson,
+ SearchResultSummary,
} from "@/new/photos/services/search/types";
import {
ClipSearchScores,
@@ -12,7 +13,6 @@ import {
SearchQuery,
Suggestion,
SuggestionType,
- UpdateSearch,
} from "@/new/photos/services/search/types";
import { labelForSuggestionType } from "@/new/photos/services/search/ui";
import type { LocationTag } from "@/new/photos/services/user-entity";
@@ -62,13 +62,18 @@ import { SelectStyles } from "../styles/search";
const { Option, ValueContainer, Menu } = components;
interface SearchBarProps {
- updateSearch: UpdateSearch;
- collections: Collection[];
- files: EnteFile[];
isInSearchMode: boolean;
setIsInSearchMode: (v: boolean) => void;
+ collections: Collection[];
+ updateSearch: UpdateSearch;
+ files: EnteFile[];
}
+export type UpdateSearch = (
+ search: SearchQuery,
+ summary: SearchResultSummary,
+) => void;
+
export const SearchBar: React.FC<SearchBarProps> = ({
setIsInSearchMode,
isInSearchMode,
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index 237ba84668..761f6cb32f 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -13,7 +13,6 @@ import { search, setSearchableFiles } from "@/new/photos/services/search";
import {
SearchQuery,
SearchResultSummary,
- UpdateSearch,
} from "@/new/photos/services/search/types";
import { EnteFile } from "@/new/photos/types/file";
import { mergeMetadata } from "@/new/photos/utils/file";
@@ -68,7 +67,7 @@ import GalleryEmptyState from "components/GalleryEmptyState";
import { LoadingOverlay } from "components/LoadingOverlay";
import PhotoFrame from "components/PhotoFrame";
import { ITEM_TYPE, TimeStampListItem } from "components/PhotoList";
-import { SearchBar } from "components/SearchBar";
+import { SearchBar, type UpdateSearch } from "components/SearchBar";
import Sidebar from "components/Sidebar";
import UploadButton from "components/Upload/UploadButton";
import type { UploadTypeSelectorIntent } from "components/Upload/UploadTypeSelector";
diff --git a/web/packages/new/photos/services/search/types.ts b/web/packages/new/photos/services/search/types.ts
index b2130e4bbc..986e8ecc4c 100644
--- a/web/packages/new/photos/services/search/types.ts
+++ b/web/packages/new/photos/services/search/types.ts
@@ -149,9 +149,4 @@ export interface SearchOption extends Suggestion {
previewFiles: EnteFile[];
}
-export type UpdateSearch = (
- search: SearchQuery,
- summary: SearchResultSummary,
-) => void;
-
export type ClipSearchScores = Map<number, number>;