diff --git a/src/App.js b/src/App.js index 3b5e5e1..131d32d 100644 --- a/src/App.js +++ b/src/App.js @@ -162,7 +162,7 @@ function TableEditor(p) { .then(()=>{ setUpdate(true) }) - },[fileData,p.path,p.BACKENDURL,p.password]) + },[fileData,p.path,p.BACKENDURL,p.password,fields]) useEffect(()=>{ for (var col of fields) { @@ -793,12 +793,16 @@ function App() { const [LOGGEDINUSER,setLOGGEDINUSER] = useState("") const [LOGGEDINHASH,setLOGGEDINHASH] = useState("") - function GetData(table,row,col,id){ if (row===undefined) {row=''} if (col===undefined) {col=''} var data = id?DATAID:DATA - return data!==undefined?data[table]!==undefined?data[table][row]!==undefined?data[table][row][col]!==undefined?data[table][row][col]:data[table][row]:data[table]:data:"no data" + var result = data!==undefined?data[table]!==undefined?data[table][row]!==undefined?data[table][row][col]!==undefined?data[table][row][col]:data[table][row]:data[table]:data:"no data" + if (typeof result === 'object' && result["GetData"]!==undefined) { + return undefined + } else { + return result + } } useEffect(()=>{ @@ -891,8 +895,8 @@ function App() {
- {GetData("site_data")[2]?.data??""}
+ {GetData("site_data","UNDER_CONSTRUCTION_TEXT","data")}