diff --git a/artifacts/postiz-mobile/context/PostizContext.tsx b/artifacts/postiz-mobile/context/PostizContext.tsx index 4ae025a..64bb15f 100644 --- a/artifacts/postiz-mobile/context/PostizContext.tsx +++ b/artifacts/postiz-mobile/context/PostizContext.tsx @@ -94,7 +94,7 @@ export function PostizProvider({ children }: { children: React.ReactNode }) { const url = (storedUrl || DEFAULT_BASE_URL).replace(/\/$/, ""); setApiKey(storedKey); setBaseUrl(url); - setClient(createClient(storedKey, url)); + setClient(() => createClient(storedKey, url)); } } catch { } finally { @@ -109,7 +109,7 @@ export function PostizProvider({ children }: { children: React.ReactNode }) { await SecureStore.setItemAsync(BASE_URL_STORAGE, newBaseUrl); setApiKey(newApiKey); setBaseUrl(newBaseUrl); - setClient(createClient(newApiKey, newBaseUrl)); + setClient(() => createClient(newApiKey, newBaseUrl)); }, [] );