Remove all warnings so app builds on production.

master
sigonasr2, Sig, Sigo 3 years ago
parent 834688fa2e
commit 32ed8d75ac
  1. 34
      src/App.js
  2. 10
      src/TestHeader.js

@ -23,9 +23,9 @@ const parse = require('csv-parse/lib/sync')
const BACKEND_URL = process.env.REACT_APP_GITPOD_WORKSPACE_URL||process.env.REACT_APP_BACKEND_URL||'https://projectdivar.com:4504'; //You can specify a .env file locally with REACT_APP_BACKEND_URL defining a URL to retrieve data from. const BACKEND_URL = process.env.REACT_APP_GITPOD_WORKSPACE_URL||process.env.REACT_APP_BACKEND_URL||'https://projectdivar.com:4504'; //You can specify a .env file locally with REACT_APP_BACKEND_URL defining a URL to retrieve data from.
const MELEE_DMG = 0 /*const MELEE_DMG = 0
const RANGE_DMG = 1 const RANGE_DMG = 1
const TECH_DMG = 2 const TECH_DMG = 2 //NOT USED YET*/
function Col(p) { function Col(p) {
return <div className="con"> return <div className="con">
@ -431,7 +431,6 @@ function TableEditor(p) {
const [dependencies,setDependencies] = useState([]) const [dependencies,setDependencies] = useState([])
const [importAllowed,setImportAllowed] = useState(false) const [importAllowed,setImportAllowed] = useState(false)
const [fileData,setFileData] = useState(undefined) const [fileData,setFileData] = useState(undefined)
const [debugMessage,setDebugMessage] = useState("")
function SubmitBoxes() { function SubmitBoxes() {
axios.post(BACKEND_URL+p.path,submitVals) axios.post(BACKEND_URL+p.path,submitVals)
@ -461,7 +460,7 @@ function TableEditor(p) {
.then(()=>{ .then(()=>{
setUpdate(true) setUpdate(true)
}) })
},[fileData]) },[fileData,p.path])
useEffect(()=>{ useEffect(()=>{
for (var col of fields) { for (var col of fields) {
@ -513,7 +512,6 @@ function TableEditor(p) {
} }
reader.readAsText(f.target.files[0]) reader.readAsText(f.target.files[0])
}} style={{opacity:0}} id="uploads" type="file" accept=".txt,.csv"/></caption>} }} style={{opacity:0}} id="uploads" type="file" accept=".txt,.csv"/></caption>}
{JSON.stringify(debugMessage)}
<thead> <thead>
<tr> <tr>
<th className="table-padding"></th> <th className="table-padding"></th>
@ -649,7 +647,7 @@ function EditStatBox(p) {
function DamageCalculator(p) { function DamageCalculator(p) {
const [augmentData,setAugmentData] = useState({}) const [augmentData,setAugmentData] = useState({})
const [update,setUpdate] = useState(false) //const [update,setUpdate] = useState(false)
useEffect(()=>{ useEffect(()=>{
axios.get(BACKEND_URL+"/augment") axios.get(BACKEND_URL+"/augment")
@ -658,7 +656,7 @@ function DamageCalculator(p) {
data.data.rows.forEach((entry)=>{augmentData[entry.id]=entry}) data.data.rows.forEach((entry)=>{augmentData[entry.id]=entry})
setAugmentData(augmentData) setAugmentData(augmentData)
}) })
},[update]) },[])
const character = { const character = {
weapon:{ weapon:{
@ -677,22 +675,18 @@ function DamageCalculator(p) {
useEffect(()=>{ useEffect(()=>{
if (Object.keys(augmentData).length>0) { if (Object.keys(augmentData).length>0) {
ParseAllAugments(character) var searchFields = [{field:"variance",variable:0},{field:"mel_dmg",variable:0}]
} for (var equip of [character.weapon,character.armor1,character.armor2,character.armor3]) {
},[augmentData]) for (var field of searchFields) {
for (var i=0;i<equip.augments.length;i++) {
function ParseAllAugments(character) { var variance = augmentData[equip.augments[i]][field.field]
var searchFields = [{field:"variance",variable:0},{field:"mel_dmg",variable:0}] field.variable+=variance
for (var equip of [character.weapon,character.armor1,character.armor2,character.armor3]) { }
for (var field of searchFields) {
for (var i=0;i<equip.augments.length;i++) {
var variance = augmentData[equip.augments[i]][field.field]
field.variable+=variance
} }
} }
setAugDmgVariance(searchFields[0].variable)
} }
setAugDmgVariance(searchFields[0].variable) },[augmentData,character.armor1,character.armor2,character.armor3,character.weapon])
}
const [rawDmg,setRawDmg] = useState(0) const [rawDmg,setRawDmg] = useState(0)

@ -5,11 +5,11 @@ function TestHeader() {
<div id="header"> <div id="header">
<div> <div>
<ul> <ul>
<li className="logo"><a><img alt="" src={process.env.PUBLIC_URL + '/icons/logo_sm.png'} />&emsp;NGSplanner.com</a></li> <li className="logo"><a href="."><img alt="" src={process.env.PUBLIC_URL + '/icons/logo_sm.png'} />&emsp;NGSplanner.com</a></li>
<li className="headermenuitem"><a>Build Planner</a></li> <li className="headermenuitem"><a href=".">Build Planner</a></li>
<li className="headermenuitem"><a>Guides</a></li> <li className="headermenuitem"><a href=".">Guides</a></li>
<li className="headermenuitem"><a>Blog</a></li> <li className="headermenuitem"><a href=".">Blog</a></li>
<li className="headermenuitem"><a>About</a></li> <li className="headermenuitem"><a href=".">About</a></li>
</ul> </ul>
</div> </div>
</div> </div>

Loading…
Cancel
Save