diff --git a/frontend/src/pages/pc/admin/AdminScheduleBots.jsx b/frontend/src/pages/pc/admin/AdminScheduleBots.jsx index 0642b80..be9b35f 100644 --- a/frontend/src/pages/pc/admin/AdminScheduleBots.jsx +++ b/frontend/src/pages/pc/admin/AdminScheduleBots.jsx @@ -14,6 +14,7 @@ function AdminScheduleBots() { const [toast, setToast] = useState(null); const [bots, setBots] = useState([]); const [loading, setLoading] = useState(true); + const [isInitialLoad, setIsInitialLoad] = useState(true); // 첫 로드 여부 (애니메이션용) const [syncing, setSyncing] = useState(null); // 동기화 중인 봇 ID const [quotaWarning, setQuotaWarning] = useState(null); // 할당량 경고 상태 @@ -110,11 +111,16 @@ function AdminScheduleBots() { }); if (response.ok) { + // 로컬 상태만 업데이트 (전체 목록 새로고침 대신) + setBots(prev => prev.map(bot => + bot.id === botId + ? { ...bot, status: action === 'start' ? 'running' : 'stopped' } + : bot + )); setToast({ type: 'success', message: action === 'start' ? `${botName} 봇이 시작되었습니다.` : `${botName} 봇이 정지되었습니다.` }); - fetchBots(); // 목록 새로고침 } else { const data = await response.json(); setToast({ type: 'error', message: data.error || '작업 실패' }); @@ -328,7 +334,7 @@ function AdminScheduleBots() {

봇 목록