MOB-961 - taxon details - when navigating the taxonomy tree, preserve the navigation stack

This commit is contained in:
Yaron Budowski
2025-10-23 17:05:14 +01:00
committed by Johannes Klein
parent f4b7d67722
commit 7e401279b7

View File

@@ -23,15 +23,13 @@ const Taxonomy = ( { taxon: currentTaxon, hideNavButtons }: Props ) => {
const scientificNameFirst = currentUser?.prefers_scientific_name_first;
const navigateToTaxonDetails = ( taxonId: number ) => (
navigation.navigate( {
navigation.push( "TaxonDetails", {
// Ensure button mashing doesn't open multiple TaxonDetails instances
key: `${route.key}-Taxonomy-TaxonDetails-${taxonId}`,
name: "TaxonDetails",
params: {
id: taxonId,
hideNavButtons,
usesVision: false
}
id: taxonId,
hideNavButtons,
usesVision: false
} )
);