Update AgentDashboard.tsx
This commit is contained in:
@@ -274,9 +274,13 @@ export const AgentDashboard: React.FC<AgentDashboardProps> = ({
|
||||
const [newQueueForm, setNewQueueForm] = useState<Partial<TicketQueue>>({ name: '', description: '' });
|
||||
const [tempSettings, setTempSettings] = useState<AppSettings>(settings);
|
||||
|
||||
// Sync tempSettings with settings prop ONLY if NOT in settings view
|
||||
// This prevents background polling from resetting form data while the user is typing
|
||||
useEffect(() => {
|
||||
if (view !== 'settings') {
|
||||
setTempSettings(settings);
|
||||
}, [settings]);
|
||||
}
|
||||
}, [settings, view]);
|
||||
|
||||
const [isTestingSmtp, setIsTestingSmtp] = useState(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user