From d7d4a6449d6c682e152c243b7aeb0aa35f8d0285 Mon Sep 17 00:00:00 2001 From: Johannes Klein Date: Wed, 13 May 2026 15:55:13 +0200 Subject: [PATCH] Remove inatjs config change --- src/api/posts.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/api/posts.ts b/src/api/posts.ts index edb431d3e..ce3c6c4c5 100644 --- a/src/api/posts.ts +++ b/src/api/posts.ts @@ -1,21 +1,15 @@ import type { ErrorWithResponse, INatApiError } from "api/error"; import handleError from "api/error"; import inatjs from "inaturalistjs"; -import Config from "react-native-config"; const fetchUserPosts = async ( params: Record = {}, opts: Record = {}, ): Promise | null | ErrorWithResponse | INatApiError> => { try { - inatjs.setConfig( { apiURL: "https://api.inaturalist.org/v1" } ); const response = await inatjs.posts.for_user( params, opts ); - inatjs.setConfig( { apiURL: Config.API_URL } ); if ( !response ) { return null; } - // v1 return - return response; - // v2 return - // return response?.results; + return response?.results; } catch ( e ) { return handleError( e as ErrorWithResponse,