Fix Test Mode toggling breaking.

master
Joshua Sigona 3 years ago
parent 5454574807
commit bb528b9b41
  1. 6
      src/App.js

@ -101,6 +101,8 @@ function TableEditor(p) {
const initialVals={} const initialVals={}
const { TESTMODE } = p
function updateVals(state,update) { function updateVals(state,update) {
if (update==='Clear') { if (update==='Clear') {
return initialVals return initialVals
@ -165,7 +167,7 @@ function TableEditor(p) {
useEffect(()=>{ useEffect(()=>{
setUpdate(true) setUpdate(true)
},[p.path]) },[p.path,TESTMODE])
useEffect(()=>{ useEffect(()=>{
for (var col of fields) { for (var col of fields) {
@ -448,7 +450,7 @@ function AdminPanel(p) {
<Helmet> <Helmet>
<title>{APP_TITLE+" - Admin Panel: "+nav.page}</title> <title>{APP_TITLE+" - Admin Panel: "+nav.page}</title>
</Helmet> </Helmet>
{nav.render??<TableEditor password={password} BACKENDURL={GetBackendURL(p)} path={nav.table}/>} {nav.render??<TableEditor TESTMODE={p.TESTMODE} password={password} BACKENDURL={GetBackendURL(p)} path={nav.table}/>}
</div></div></Route>)} </div></div></Route>)}
<Route path={process.env.PUBLIC_URL+"/admin/database_manager"}> <Route path={process.env.PUBLIC_URL+"/admin/database_manager"}>

Loading…
Cancel
Save