mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
MOB-512 hide confidence metrics
This commit is contained in:
@@ -19,9 +19,10 @@ interface Props {
|
||||
score?: number;
|
||||
taxon: RealmTaxon;
|
||||
};
|
||||
hideObservationStatus?: boolean
|
||||
}
|
||||
|
||||
const MatchHeader = ( { topSuggestion }: Props ) => {
|
||||
const MatchHeader = ( { topSuggestion, hideObservationStatus }: Props ) => {
|
||||
const { t } = useTranslation( );
|
||||
const taxon = topSuggestion?.taxon;
|
||||
|
||||
@@ -89,17 +90,19 @@ const MatchHeader = ( { topSuggestion }: Props ) => {
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Body2 className="mb-2">{generateCongratulatoryText( )}</Body2>
|
||||
{!hideObservationStatus && <Body2 className="mb-2">{generateCongratulatoryText( )}</Body2>}
|
||||
<View className="flex-row justify-between items-center">
|
||||
{showSuggestedTaxon( )}
|
||||
<View className="justify-end items-center ml-5">
|
||||
<Subheading2 className="text-inatGreen mb-2">
|
||||
{t( "X-percent", { count: confidence } )}
|
||||
</Subheading2>
|
||||
<Body4 className="text-inatGreen">
|
||||
{t( "Confidence--label" )}
|
||||
</Body4>
|
||||
</View>
|
||||
{ !hideObservationStatus && (
|
||||
<View className="justify-end items-center ml-5">
|
||||
<Subheading2 className="text-inatGreen mb-2">
|
||||
{t( "X-percent", { count: confidence } )}
|
||||
</Subheading2>
|
||||
<Body4 className="text-inatGreen">
|
||||
{t( "Confidence--label" )}
|
||||
</Body4>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -32,17 +32,15 @@ const SavedMatch = ( {
|
||||
const latitude = observation?.privateLatitude || observation?.latitude;
|
||||
const { taxon } = observation;
|
||||
|
||||
/* left todo
|
||||
- simplify match header
|
||||
- add edit pencil
|
||||
- fix type errors
|
||||
/*
|
||||
todo: globalize class strings and maybe some of the resused container functions
|
||||
*/
|
||||
|
||||
return (
|
||||
<ScrollViewWrapper>
|
||||
<SavedMatchHeaderRight uuid={observation.uuid} />
|
||||
<View className={cardClassTop}>
|
||||
<MatchHeader topSuggestion={observation} />
|
||||
<MatchHeader hideObservationStatus topSuggestion={observation} />
|
||||
</View>
|
||||
<PhotosSection
|
||||
representativePhoto={taxon?.representative_photo}
|
||||
|
||||
Reference in New Issue
Block a user