From 96f08792309ede0e4d7d5a44fa2669415c05eec3 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 22 Sep 2021 01:10:29 -0400 Subject: [PATCH] fix bug with nano --- src/Infiltration/ui/Intro.tsx | 1 - src/ScriptEditor/ui/Root.tsx | 3 +-- src/ui/React/Theme.tsx | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Infiltration/ui/Intro.tsx b/src/Infiltration/ui/Intro.tsx index 10e625816..73ff8d6a0 100644 --- a/src/Infiltration/ui/Intro.tsx +++ b/src/Infiltration/ui/Intro.tsx @@ -48,7 +48,6 @@ function coloredArrow(difficulty: number): JSX.Element { } export function Intro(props: IProps): React.ReactElement { - console.log(props); return ( <> diff --git a/src/ScriptEditor/ui/Root.tsx b/src/ScriptEditor/ui/Root.tsx index 7ca1ed36e..6463b8414 100644 --- a/src/ScriptEditor/ui/Root.tsx +++ b/src/ScriptEditor/ui/Root.tsx @@ -76,7 +76,7 @@ let lastPosition: monaco.Position | null = null; export function Root(props: IProps): React.ReactElement { const editorRef = useRef(null); const [filename, setFilename] = useState(props.filename ? props.filename : lastFilename); - const [code, setCode] = useState(props.code ? props.code : lastCode); + const [code, setCode] = useState(props.filename ? props.code : lastCode); const [ram, setRAM] = useState("RAM: ???"); const [options, setOptions] = useState({ theme: Settings.MonacoTheme, @@ -86,7 +86,6 @@ export function Root(props: IProps): React.ReactElement { // store the last known state in case we need to restart without nano. useEffect(() => { if (props.filename === undefined) return; - console.log("setting to " + props.filename); lastFilename = props.filename; lastCode = props.code; lastPosition = null; diff --git a/src/ui/React/Theme.tsx b/src/ui/React/Theme.tsx index a5f1ae2fd..da4c3ed4c 100644 --- a/src/ui/React/Theme.tsx +++ b/src/ui/React/Theme.tsx @@ -290,7 +290,6 @@ function refreshTheme() { }, }, }); - console.log("refreshed"); } refreshTheme();