mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 10:51:02 +01:00
fix: reset state and fetch arr instances when ImportModal opens
This commit is contained in:
@@ -11,8 +11,11 @@ const ImportModal = ({isOpen, onClose, onImport, type}) => {
|
||||
const [isImporting, setIsImporting] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
// Fetch available arrs when modal opens
|
||||
// Reset state when modal opens and fetch arr instances
|
||||
if (isOpen) {
|
||||
setSelectedArr('');
|
||||
setError('');
|
||||
setIsImporting(false);
|
||||
fetchArrs();
|
||||
}
|
||||
}, [isOpen]);
|
||||
|
||||
Reference in New Issue
Block a user