mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
fix bug with nano
This commit is contained in:
parent
9c40cf6f28
commit
96f0879230
@ -48,7 +48,6 @@ function coloredArrow(difficulty: number): JSX.Element {
|
||||
}
|
||||
|
||||
export function Intro(props: IProps): React.ReactElement {
|
||||
console.log(props);
|
||||
return (
|
||||
<>
|
||||
<Grid container spacing={3}>
|
||||
|
@ -76,7 +76,7 @@ let lastPosition: monaco.Position | null = null;
|
||||
export function Root(props: IProps): React.ReactElement {
|
||||
const editorRef = useRef<IStandaloneCodeEditor | null>(null);
|
||||
const [filename, setFilename] = useState(props.filename ? props.filename : lastFilename);
|
||||
const [code, setCode] = useState<string>(props.code ? props.code : lastCode);
|
||||
const [code, setCode] = useState<string>(props.filename ? props.code : lastCode);
|
||||
const [ram, setRAM] = useState("RAM: ???");
|
||||
const [options, setOptions] = useState<Options>({
|
||||
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;
|
||||
|
@ -290,7 +290,6 @@ function refreshTheme() {
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log("refreshed");
|
||||
}
|
||||
refreshTheme();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user