()
| 10 | const [testCaseResults, setTestCaseResults] = useState([]); |
| 11 | |
| 12 | const checkCode = () => { |
| 13 | axios |
| 14 | .post('http://localhost:80/python', { code }) |
| 15 | .then(({ data }) => { |
| 16 | setTestCaseResults(data.testCaseResults); |
| 17 | }) |
| 18 | .catch((err) => console.log(err)); |
| 19 | }; |
| 20 | |
| 21 | return ( |
| 22 | <div className="App"> |