mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-03 13:29:47 -04:00
* Move ProjectDetails to TS * Remove flow type * Type object properties * Narrower type possible for helper function * Type nav prop * Type route params away from here * Type route params away from here * Type more project keys * Type route params to Explore * Type place generic for now * Type function props * Update displayProjectType.ts * WIP: Add Alert to dummy codepath * Move Alert to on button press, so before sheet is displayed * Update string * Update ProjectDetails.tsx * Update ProjectDetailsContainer.tsx * Remove flow type * Type nav props * Type ApiProject with fields we query for in ProjectDetails Also check which ones are nullable according to API V2 docs * Reorder fields * Also request place_id field This must be some kind of bug because the next query expects that we are asking for this value for the project. * Apparently ProjectDetails sends an entire api result over navigation params * Fix a TS error * Same fix * Replace second API call with data we can get from project call * Fix a TS error * Nullable properties according to API docs, do actually get back as null to us and not undefined * Null passes through as prop * I don't think those can be null * Add other API query types * Refactor to not pass id as function param * Also query for membership_model * Code style * This seems nonsensical to me Omit project_type and then put it back in * Lift rule_preferences type to ApiProject * Query for rule_preferences in Project details * Minimal interface to use this function * Reinstate previous interface * Project now has a rule_preference field from container * Be specific with what keys we prop down from container * Route params are not optional because of a prior null check * Update mock * Add a TODO * Add export