mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
Merge pull request #3221 from frewsxcv/frewsxcv-240FC0C7-86BF-40B6-BCF7-DEC15AB7E4F8
Migrate `tryToReplaceWithLocalTaxon` to TypeScript.
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
const tryToReplaceWithLocalTaxon = ( localTaxa, suggestion ) => {
|
||||
import Taxon from "realmModels/Taxon";
|
||||
import type { RealmTaxon } from "realmModels/types";
|
||||
|
||||
const tryToReplaceWithLocalTaxon = (
|
||||
localTaxa: ( Taxon & RealmTaxon )[],
|
||||
suggestion: { taxon: { id: number } }
|
||||
) => {
|
||||
const localTaxon = localTaxa.find( local => local.id === suggestion.taxon.id );
|
||||
|
||||
if ( localTaxon ) {
|
||||
Reference in New Issue
Block a user