From 12e1c840d6df2188724f3140f73465c6e0f7e97c Mon Sep 17 00:00:00 2001 From: sepeterson <10458078+sepeterson@users.noreply.github.com> Date: Thu, 20 Nov 2025 09:06:42 -0600 Subject: [PATCH 01/35] MOB-512 saved match UI --- .../ObsDetailsDefaultMode/SavedMatch.tsx | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/components/ObsDetailsDefaultMode/SavedMatch.tsx diff --git a/src/components/ObsDetailsDefaultMode/SavedMatch.tsx b/src/components/ObsDetailsDefaultMode/SavedMatch.tsx new file mode 100644 index 000000000..d3c1e919f --- /dev/null +++ b/src/components/ObsDetailsDefaultMode/SavedMatch.tsx @@ -0,0 +1,94 @@ +import { useNetInfo } from "@react-native-community/netinfo"; +import EmptyMapSection from "components/Match/EmptyMapSection"; +import MatchHeader from "components/Match/MatchHeader"; +import PhotosSection from "components/Match/PhotosSection"; +import LocationSection from "components/ObsDetailsDefaultMode/LocationSection/LocationSection"; +import MapSection from "components/ObsDetailsDefaultMode/MapSection/MapSection"; +import { Button, ScrollViewWrapper } from "components/SharedComponents"; +import { View } from "components/styledComponents"; +import _ from "lodash"; +import React from "react"; +import type { RealmObservation } from "realmModels/types"; +import { useTranslation } from "sharedHooks"; + +const cardClassTop + = "rounded-t-2xl border-lightGray border-[2px] py-[18px] px-5 border-b-0 -mb-0.5"; +const cardClassBottom + = "rounded-b-2xl border-lightGray border-[2px] pb-3 border-t-0 -mt-0.5 mb-[30px]"; + +type Props = { + observation: RealmObservation, + navToTaxonDetails: ( ) => void, + isFetchingLocation: boolean, + handleAddLocationPressed: ( ) => void, +} + +const SavedMatch = ( { + observation, + navToTaxonDetails, + isFetchingLocation, + handleAddLocationPressed +}: Props ) => { + const { t } = useTranslation( ); + const { isConnected } = useNetInfo( ); + + const latitude = observation?.privateLatitude || observation?.latitude; + const { taxon } = observation; + + return ( + + + + + + + {!latitude + ? ( + + ) + : ( + + )} + + + { + isConnected && ( +