🐛 fix(App.tsx): replace fetch call with getVersion function call to retrieve app version
✨ feat(App.tsx): add getVersion function to retrieve app version from API The fetch call to retrieve the app version has been replaced with a call to the getVersion function. This function retrieves the app version from the API. This change improves the code's readability and reduces the amount of code needed to retrieve the app version. 🐛 fix(GenericNode/index.tsx): replace fetch call with postValidateNode function call to validate node ✨ feat(GenericNode/index.tsx): add postValidateNode function to validate node via API The fetch call to validate the node has been replaced with a call to the postValidateNode function. This function validates the node via the API. This change improves the code's readability and reduces the amount of code needed to validate the node. 🐛 fix(codeAreaModal/index.tsx): replace checkCode function call with postValidateCode function call to validate code ✨ feat(codeAreaModal/index.tsx): add postValidateCode function to validate code via API The checkCode function call to validate the code has been replaced with a call to the postValidateCode function. This function validates the code via the API. This change improves the code's readability and reduces the amount of code needed to validate the code.
This commit is contained in:
parent
21440578a7
commit
10fce79bc3
3 changed files with 16 additions and 21 deletions
|
|
@ -8,7 +8,7 @@ import "ace-builds/src-noconflict/theme-twilight";
|
|||
import "ace-builds/src-noconflict/ext-language_tools";
|
||||
// import "ace-builds/webpack-resolver";
|
||||
import { darkContext } from "../../contexts/darkContext";
|
||||
import { checkCode } from "../../controllers/API";
|
||||
import { postValidateCode } from "../../controllers/API";
|
||||
import { alertContext } from "../../contexts/alertContext";
|
||||
import { TabsContext } from "../../contexts/tabsContext";
|
||||
import {
|
||||
|
|
@ -81,7 +81,7 @@ export default function CodeAreaModal({
|
|||
<Button
|
||||
className="mt-3"
|
||||
onClick={() => {
|
||||
checkCode(code)
|
||||
postValidateCode(code)
|
||||
.then((apiReturn) => {
|
||||
if (apiReturn.data) {
|
||||
let importsErrors = apiReturn.data.imports.errors;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue