diff --git a/frontend/src/components/settings/SettingsPage.jsx b/frontend/src/components/settings/SettingsPage.jsx index 0bdc9cb..d156b6b 100644 --- a/frontend/src/components/settings/SettingsPage.jsx +++ b/frontend/src/components/settings/SettingsPage.jsx @@ -27,10 +27,11 @@ const SettingsPage = () => { const [showBranchModal, setShowBranchModal] = useState(false); const [loadingAction, setLoadingAction] = useState(''); const [statusLoading, setStatusLoading] = useState(true); + const [devModeLoading, setDevModeLoading] = useState(true); const [statusLoadingMessage, setStatusLoadingMessage] = useState(''); const [noChangesMessage, setNoChangesMessage] = useState(''); - const [activeTab, setActiveTab] = useState('git'); // New state for tab navigation - const tabsRef = useRef({}); // Ref for tabs + const [activeTab, setActiveTab] = useState('git'); + const tabsRef = useRef({}); useEffect(() => { fetchSettings(); @@ -38,12 +39,15 @@ const SettingsPage = () => { }, []); const checkDevModeStatus = async () => { + setDevModeLoading(true); try { const response = await checkDevMode(); setIsDevMode(response.devMode); } catch (error) { console.error('Error checking dev mode:', error); setIsDevMode(false); + } finally { + setDevModeLoading(false); } }; @@ -215,14 +219,16 @@ const SettingsPage = () => { {settings && (
- {statusLoading ? ( + {statusLoading || devModeLoading ? (
- {statusLoadingMessage} + {statusLoading + ? statusLoadingMessage + : 'Checking development mode...'}
) : (