fix: format
This commit is contained in:
@@ -29,16 +29,13 @@ export const RunSettingsModal = ({ isOpen, handleStart, handleClose, isTask, par
|
|||||||
|
|
||||||
const [showInterpreterSettings, setShowInterpreterSettings] = useState(false);
|
const [showInterpreterSettings, setShowInterpreterSettings] = useState(false);
|
||||||
|
|
||||||
// Run immediately without modal if settings don't need to be shown
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!showInterpreterSettings) {
|
if (!showInterpreterSettings) {
|
||||||
handleStart(settings); // Start the run
|
handleStart(settings);
|
||||||
}
|
}
|
||||||
// Ensure this runs only when the component mounts or settings change
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [showInterpreterSettings]);
|
}, [showInterpreterSettings]);
|
||||||
|
|
||||||
// Do not render the modal if settings are not shown
|
|
||||||
if (!showInterpreterSettings) {
|
if (!showInterpreterSettings) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user