Fixed code area saving when not supposed to
This commit is contained in:
parent
07e6b137c4
commit
d0be105055
1 changed files with 1 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ import "ace-builds/src-noconflict/mode-python";
|
||||||
import "ace-builds/src-noconflict/theme-github";
|
import "ace-builds/src-noconflict/theme-github";
|
||||||
import "ace-builds/src-noconflict/theme-twilight";
|
import "ace-builds/src-noconflict/theme-twilight";
|
||||||
import { TerminalSquare } from "lucide-react";
|
import { TerminalSquare } from "lucide-react";
|
||||||
import { useContext, useEffect, useRef, useState } from "react";
|
import { useContext, useRef, useState } from "react";
|
||||||
import AceEditor from "react-ace";
|
import AceEditor from "react-ace";
|
||||||
import { Button } from "../../components/ui/button";
|
import { Button } from "../../components/ui/button";
|
||||||
import { CODE_PROMPT_DIALOG_SUBTITLE } from "../../constants";
|
import { CODE_PROMPT_DIALOG_SUBTITLE } from "../../constants";
|
||||||
|
|
@ -37,9 +37,6 @@ export default function CodeAreaModal({
|
||||||
detail: { error: string; traceback: string };
|
detail: { error: string; traceback: string };
|
||||||
}>(null);
|
}>(null);
|
||||||
const ref = useRef();
|
const ref = useRef();
|
||||||
useEffect(() => {
|
|
||||||
setValue(code);
|
|
||||||
}, [code, setValue]);
|
|
||||||
|
|
||||||
function setModalOpen(x: boolean) {
|
function setModalOpen(x: boolean) {
|
||||||
if (x === false) {
|
if (x === false) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue