diff --git a/web/src/views/explore/ExploreView.tsx b/web/src/views/explore/ExploreView.tsx
index 8145312e3..03bebd4bd 100644
--- a/web/src/views/explore/ExploreView.tsx
+++ b/web/src/views/explore/ExploreView.tsx
@@ -1,5 +1,5 @@
import { useEffect, useMemo } from "react";
-import { isIOS, isMobileOnly } from "react-device-detect";
+import { isIOS, isMobileOnly, isSafari } from "react-device-detect";
import useSWR from "swr";
import { useApiHost } from "@/api";
import { cn } from "@/lib/utils";
@@ -12,6 +12,9 @@ import {
} from "@/components/ui/tooltip";
import { TooltipPortal } from "@radix-ui/react-tooltip";
import { SearchResult } from "@/types/search";
+import ImageLoadingIndicator from "@/components/indicators/ImageLoadingIndicator";
+import useImageLoaded from "@/hooks/use-image-loaded";
+import ActivityIndicator from "@/components/indicators/activity-indicator";
type ExploreViewProps = {
onSelectSearch: (searchResult: SearchResult, detail: boolean) => void;
@@ -50,8 +53,14 @@ export default function ExploreView({ onSelectSearch }: ExploreViewProps) {
}, {});
}, [events]);
+ if (!events) {
+ return (
+
+ );
+ }
+
return (
-
+
{Object.entries(eventsByLabel).map(([label, filteredEvents]) => (
{
@@ -106,22 +114,9 @@ function ThumbnailRow({
key={event.id}
className="relative aspect-square h-auto max-w-[20%] flex-grow md:max-w-[10%]"
>
-
onSelectSearch(event, true)}
+
))}
@@ -148,6 +143,48 @@ function ThumbnailRow({
);
}
+type ExploreThumbnailImageProps = {
+ event: SearchResult;
+ onSelectSearch: (searchResult: SearchResult, detail: boolean) => void;
+};
+function ExploreThumbnailImage({
+ event,
+ onSelectSearch,
+}: ExploreThumbnailImageProps) {
+ const apiHost = useApiHost();
+ const [imgRef, imgLoaded, onImgLoad] = useImageLoaded();
+
+ return (
+ <>
+
+

onSelectSearch(event, true)}
+ onLoad={() => {
+ onImgLoad();
+ }}
+ />
+ >
+ );
+}
+
function ExploreMoreLink({ objectType }: { objectType: string }) {
const formattedType = objectType.replaceAll("_", " ");
const label = formattedType.endsWith("s")
diff --git a/web/src/views/search/SearchView.tsx b/web/src/views/search/SearchView.tsx
index 0cc0f99dc..1997e0430 100644
--- a/web/src/views/search/SearchView.tsx
+++ b/web/src/views/search/SearchView.tsx
@@ -110,18 +110,18 @@ export default function SearchView({
{config?.semantic_search?.enabled && (