From 55e2c8b4e14d91c928b72ef8e29465e0daeadc75 Mon Sep 17 00:00:00 2001
From: sepeterson <10458078+sepeterson@users.noreply.github.com>
Date: Tue, 16 Jun 2026 16:38:56 -0500
Subject: [PATCH] MOB-1327: add thumbnail and support place-only visuals
---
.../ExploreV2/components/ExploreV2Header.tsx | 118 ++++++++++++++----
1 file changed, 92 insertions(+), 26 deletions(-)
diff --git a/src/components/Explore/ExploreV2/components/ExploreV2Header.tsx b/src/components/Explore/ExploreV2/components/ExploreV2Header.tsx
index 32ec13f57..9d48660d3 100644
--- a/src/components/Explore/ExploreV2/components/ExploreV2Header.tsx
+++ b/src/components/Explore/ExploreV2/components/ExploreV2Header.tsx
@@ -1,11 +1,15 @@
import { useNavigation } from "@react-navigation/native";
import {
Body3,
+ Heading2,
Heading4,
+ IconicTaxonIcon,
INatIcon,
+ UserIcon,
} from "components/SharedComponents";
+import BackButton from "components/SharedComponents/Buttons/BackButton";
import ContainedSquareButton from "components/SharedComponents/Buttons/ContainedSquareButton";
-import { View } from "components/styledComponents";
+import { Image, View } from "components/styledComponents";
import type { TFunction } from "i18next";
import type { ExploreStackScreenProps } from "navigation/types";
import type { ExploreV2LocationState, ExploreV2Subject } from "providers/ExploreV2Context";
@@ -17,6 +21,8 @@ import React from "react";
import { useTranslation } from "sharedHooks";
import colors from "styles/tailwindColors";
+const THUMBNAIL_CLASS = "w-[62px] h-[62px] rounded-lg";
+
function subjectLabel( subject: ExploreV2Subject | null, t: TFunction ): string {
if ( !subject ) { return t( "All-organisms" ); }
switch ( subject.type ) {
@@ -44,6 +50,50 @@ function locationLabel( location: ExploreV2LocationState, t: TFunction ): string
}
}
+const SubjectThumbnail = ( { subject }: { subject: ExploreV2Subject } ) => {
+ switch ( subject.type ) {
+ case "taxon": {
+ const photo = subject.taxon.default_photo?.url;
+ return photo
+ ? (
+
+ )
+ : (
+
+ );
+ }
+ case "user":
+ return ;
+ case "project":
+ return subject.project.icon
+ ? (
+
+ )
+ : (
+
+
+
+ );
+ default:
+ return null;
+ }
+};
+
const ExploreV2Header = ( ) => {
const { t } = useTranslation( );
const { state } = useExploreV2( );
@@ -53,35 +103,51 @@ const ExploreV2Header = ( ) => {
const place = locationLabel( state.location, t );
return (
-
-
-
- {subject}
-
- {place
+
+
+
+ {state.subject
? (
-
-
-
- {place}
-
+
+
+
+
+ {subject}
+
+ {place
+ ? (
+
+
+
+ {place}
+
+
+ )
+ : null}
+
)
- : null}
+ : (
+
+
+ {place}
+
+
+ )}
+ navigation.navigate( "UniversalSearch" )}
+ testID="ExploreV2Header.searchButton"
+ />
- navigation.navigate( "UniversalSearch" )}
- testID="ExploreV2Header.searchButton"
- />
);
};