mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-20 13:38:42 -04:00
@@ -3,7 +3,6 @@
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Body2,
|
||||
Button,
|
||||
Heading4
|
||||
} from "components/SharedComponents";
|
||||
import { View } from "components/styledComponents";
|
||||
@@ -111,14 +110,6 @@ const About = ( { taxon, isLoading, isError }: Props ): React.Node => {
|
||||
{t( "TAXONOMY-header" )}
|
||||
</Heading4>
|
||||
{displayTaxonomyList}
|
||||
|
||||
<Heading4 className="my-3">
|
||||
{t( "SIMILAR-SPECIES-header" )}
|
||||
</Heading4>
|
||||
<Button
|
||||
className="mb-6"
|
||||
text={t( "VIEW-SIMILAR-SPECIES" )}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -3,14 +3,10 @@
|
||||
import { useNavigation, useRoute } from "@react-navigation/native";
|
||||
import { fetchTaxon } from "api/taxa";
|
||||
import MediaViewerModal from "components/MediaViewer/MediaViewerModal";
|
||||
import PlaceholderText from "components/PlaceholderText";
|
||||
import {
|
||||
BackButton,
|
||||
Heading4,
|
||||
HideView,
|
||||
INatIconButton,
|
||||
ScrollViewWrapper,
|
||||
Tabs
|
||||
ScrollViewWrapper
|
||||
} from "components/SharedComponents";
|
||||
import {
|
||||
Image,
|
||||
@@ -35,16 +31,12 @@ const logger = log.extend( "TaxonDetails" );
|
||||
|
||||
const { useRealm } = RealmContext;
|
||||
|
||||
const ABOUT_TAB_ID = "ABOUT";
|
||||
const DATA_TAB_ID = "DATA";
|
||||
|
||||
const TaxonDetails = ( ): Node => {
|
||||
const theme = useTheme( );
|
||||
const navigation = useNavigation( );
|
||||
const { params } = useRoute( );
|
||||
const { id } = params;
|
||||
const { t } = useTranslation( );
|
||||
const [currentTabId, setCurrentTabId] = useState( ABOUT_TAB_ID );
|
||||
const [mediaViewerVisible, setMediaViewerVisible] = useState( false );
|
||||
|
||||
const realm = useRealm( );
|
||||
@@ -65,21 +57,6 @@ const TaxonDetails = ( ): Node => {
|
||||
}
|
||||
const taxon = remoteTaxon || localTaxon;
|
||||
|
||||
const tabs = [
|
||||
{
|
||||
id: ABOUT_TAB_ID,
|
||||
testID: "TaxonDetails.AboutTab",
|
||||
onPress: () => setCurrentTabId( ABOUT_TAB_ID ),
|
||||
text: t( "ABOUT" )
|
||||
},
|
||||
{
|
||||
id: DATA_TAB_ID,
|
||||
testID: "TaxonDetails.DataTab",
|
||||
onPress: () => setCurrentTabId( DATA_TAB_ID ),
|
||||
text: t( "DATA" )
|
||||
}
|
||||
];
|
||||
|
||||
const photos = compact(
|
||||
taxon?.taxonPhotos
|
||||
? taxon.taxonPhotos.map( taxonPhoto => taxonPhoto.photo )
|
||||
@@ -144,22 +121,7 @@ const TaxonDetails = ( ): Node => {
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<Tabs tabs={tabs} activeId={currentTabId} />
|
||||
<HideView show={currentTabId === ABOUT_TAB_ID}>
|
||||
<About taxon={taxon} isLoading={isLoading} isError={isError} />
|
||||
</HideView>
|
||||
<HideView noInitialRender show={currentTabId === DATA_TAB_ID}>
|
||||
<View className="m-3">
|
||||
<Heading4>{ t( "MY-OBSERVATIONS" ) }</Heading4>
|
||||
<PlaceholderText text="TODO" />
|
||||
<Heading4>{ t( "GRAPHS" ) }</Heading4>
|
||||
<PlaceholderText text="TODO" />
|
||||
<Heading4>{ t( "TOP-OBSERVERS" ) }</Heading4>
|
||||
<PlaceholderText text="TODO" />
|
||||
<Heading4>{ t( "TOP-IDENTIFIERS" ) }</Heading4>
|
||||
<PlaceholderText text="TODO" />
|
||||
</View>
|
||||
</HideView>
|
||||
<About taxon={taxon} isLoading={isLoading} isError={isError} />
|
||||
<MediaViewerModal
|
||||
showModal={mediaViewerVisible}
|
||||
onClose={( ) => setMediaViewerVisible( false )}
|
||||
|
||||
@@ -745,9 +745,6 @@ Sign-out = Sign out
|
||||
|
||||
Sign-Up = Sign Up
|
||||
|
||||
# Header for a section showing taxa similar to a single taxon
|
||||
SIMILAR-SPECIES-header = SIMILAR SPECIES
|
||||
|
||||
# license code
|
||||
some-rights-reserved = some rights reserved
|
||||
|
||||
@@ -1233,7 +1230,6 @@ INATURALIST-ROLE = INATURALIST {$role}
|
||||
Affiliation = Affiliation: {$site}
|
||||
Monthly-Donor = Monthly Donor
|
||||
|
||||
VIEW-SIMILAR-SPECIES = VIEW SIMILAR SPECIES
|
||||
WIKIPEDIA = WIKIPEDIA
|
||||
|
||||
# Header for a section showing the viewer's observations
|
||||
|
||||
@@ -492,10 +492,6 @@
|
||||
"Share-location": "Share Location",
|
||||
"Sign-out": "Sign out",
|
||||
"Sign-Up": "Sign Up",
|
||||
"SIMILAR-SPECIES-header": {
|
||||
"comment": "Header for a section showing taxa similar to a single taxon",
|
||||
"val": "SIMILAR SPECIES"
|
||||
},
|
||||
"some-rights-reserved": {
|
||||
"comment": "license code",
|
||||
"val": "some rights reserved"
|
||||
@@ -888,7 +884,6 @@
|
||||
"INATURALIST-ROLE": "INATURALIST { $role }",
|
||||
"Affiliation": "Affiliation: { $site }",
|
||||
"Monthly-Donor": "Monthly Donor",
|
||||
"VIEW-SIMILAR-SPECIES": "VIEW SIMILAR SPECIES",
|
||||
"WIKIPEDIA": "WIKIPEDIA",
|
||||
"MY-OBSERVATIONS": {
|
||||
"comment": "Header for a section showing the viewer's observations",
|
||||
|
||||
@@ -745,9 +745,6 @@ Sign-out = Sign out
|
||||
|
||||
Sign-Up = Sign Up
|
||||
|
||||
# Header for a section showing taxa similar to a single taxon
|
||||
SIMILAR-SPECIES-header = SIMILAR SPECIES
|
||||
|
||||
# license code
|
||||
some-rights-reserved = some rights reserved
|
||||
|
||||
@@ -1233,7 +1230,6 @@ INATURALIST-ROLE = INATURALIST {$role}
|
||||
Affiliation = Affiliation: {$site}
|
||||
Monthly-Donor = Monthly Donor
|
||||
|
||||
VIEW-SIMILAR-SPECIES = VIEW SIMILAR SPECIES
|
||||
WIKIPEDIA = WIKIPEDIA
|
||||
|
||||
# Header for a section showing the viewer's observations
|
||||
|
||||
Reference in New Issue
Block a user