From 219d9b2a59be4b057f98487cd5795582417f0975 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Wed, 21 Jan 2026 00:16:26 -0500 Subject: [PATCH] fix: Update import paths for apiClient to use consistent casing --- src/utils/FeatureToggle.js | 23 ++++++++++++++--------- src/utils/Fetcher.jsx | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/utils/FeatureToggle.js b/src/utils/FeatureToggle.js index 24482ea..212a2df 100644 --- a/src/utils/FeatureToggle.js +++ b/src/utils/FeatureToggle.js @@ -100,15 +100,20 @@ export const isOfficialDonetickInstance = async () => { export const isOfficialDonetickInstanceSync = () => { try { // Dynamic import to avoid circular dependencies - return import('./apiClient').then(({ apiClient }) => { - const currentApiUrl = apiClient.baseURL - // Check if the API URL contains donetick.com - return currentApiUrl.toLowerCase().includes('donetick.com') - }).catch(error => { - console.warn('FeatureToggle: Error checking server instance (sync):', error) - // Default to false for safety (self-hosted assumption) - return false - }) + return import('./ApiClient') + .then(({ apiClient }) => { + const currentApiUrl = apiClient.baseURL + // Check if the API URL contains donetick.com + return currentApiUrl.toLowerCase().includes('donetick.com') + }) + .catch(error => { + console.warn( + 'FeatureToggle: Error checking server instance (sync):', + error, + ) + // Default to false for safety (self-hosted assumption) + return false + }) } catch (error) { console.warn('FeatureToggle: Error checking server instance (sync):', error) // Default to false for safety (self-hosted assumption) diff --git a/src/utils/Fetcher.jsx b/src/utils/Fetcher.jsx index b82b4e4..a33cfcb 100644 --- a/src/utils/Fetcher.jsx +++ b/src/utils/Fetcher.jsx @@ -1,4 +1,4 @@ -import { apiClient } from './apiClient' +`import { apiClient } from './ApiClient' // Migration helpers to maintain compatibility with existing code const Fetch = async (endpoint, options = {}) => {