Skip to content

Commit 9cad48d

Browse files
committed
fixing autorun
1 parent 6595dce commit 9cad48d

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/components/Editor/Output/Output.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ExternalFiles from "../../ExternalFiles/ExternalFiles";
44
import RunnerFactory from "../Runners/RunnerFactory";
55
import RunBar from "../../RunButton/RunBar";
66

7-
const Output = ({ outputPanels = ["text", "visual"] }, autoRun = false) => {
7+
const Output = ({ outputPanels = ["text", "visual"], autoRun = false }) => {
88
const project = useSelector((state) => state.editor.project);
99
const isEmbedded = useSelector((state) => state.editor.isEmbedded);
1010
const searchParams = new URLSearchParams(window.location.search);

src/components/Editor/Runners/PythonRunner/PyodideRunner/PyodideRunner.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ const PyodideRunner = (props) => {
149149

150150
useEffect(() => {
151151
if (autoRun) {
152-
console.log("autorunning...");
153152
dispatch(triggerCodeRun());
154153
}
155154
}, []);

src/components/Editor/Runners/RunnerFactory.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PythonRunner from "./PythonRunner/PythonRunner";
33
import HtmlRunner from "./HtmlRunner/HtmlRunner";
44

55
const RunnerFactory = ({
6-
autoRun,
6+
autoRun = false,
77
projectType,
88
outputPanels = ["text", "visual"],
99
}) => {

src/components/WebComponentProject/WebComponentProject.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ const WebComponentProject = ({
113113
))}
114114
{outputOnly && (
115115
<div className="embedded-viewer" data-testid="output-only">
116-
{loading === "success" && <Output outputPanels={outputPanels} />}
116+
{loading === "success" && (
117+
<Output autoRun={autoRun} outputPanels={outputPanels} />
118+
)}
117119
</div>
118120
)}
119121
</>

0 commit comments

Comments
 (0)