diff --git a/src/App.js b/src/App.js index ff9a5a0..39a878a 100644 --- a/src/App.js +++ b/src/App.js @@ -22,8 +22,6 @@ import TestPanel from './TestPanel'; // Dudley's Test Panel const axios = require('axios'); const parse = require('csv-parse/lib/sync') -Function.prototype.toJSON = function() { return "Unstorable function" } - /* Damage types const MELEE_DMG = 0 @@ -579,7 +577,7 @@ function DatabaseEditor(p) { }) setUpdate(false) } - },[update]) + },[update,p.BACKENDURL]) return <> {!loading?<> @@ -655,6 +653,8 @@ function DatabaseEditor(p) { setLoading(false) }) }}> Restore
+ } else { + return <> } })} @@ -945,15 +945,15 @@ function App() { const [buildName,setBuildName] = useState("Fatimah") const [className,setClassName] = useState("Ranger") const [secondaryClassName,setSecondaryClassName] = useState("Force") - const [classLv,setClassLv] = useState(20) - const [secondaryClassLv,setSecondaryClassLv] = useState(15) + const [classLv] = useState(20) + const [secondaryClassLv] = useState(15) const [bp,setBP] = useState(1330) const [hp,setHP] = useState(388) const [pp,setPP] = useState(154) - const [weaponTotalAtk,setweaponTotalAtk] = useState(282) - const [baseAtk,setbaseAtk] = useState(650) + const [weaponTotalAtk] = useState(282) + const [baseAtk] = useState(650) const [statDisplayAtk,setstatDisplayAtk] = useState(282) useEffect(()=>{ diff --git a/src/TestPanel.js b/src/TestPanel.js index cb1dbae..796fb6a 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -1,7 +1,6 @@ import React, { useEffect,useState,useRef } from 'react'; import Tooltip from 'react-simple-tooltip' //Mess with all tooltip props here: https://cedricdelpoux.github.io/react-simple-tooltip/ import Modal from 'react-modal' -import {XSquare} from 'react-bootstrap-icons' /** * Hook that alerts clicks outside of the passed ref @@ -94,7 +93,7 @@ function ExpandTooltip(p) { function Class(p) { const CLASSES = p.GetData("class") const class_obj = CLASSES[p.name] - return class_obj?<>{class_obj.name}:<> + return class_obj?<>{class_obj.name}:<> } function ClassSelector(p){ @@ -105,7 +104,7 @@ function ClassSelector(p){ Class Selector
{Object.keys(CLASSES).map((cl,i)=>{ - return + return })}
@@ -192,7 +191,7 @@ useEffect(()=>{ return [weapon_type,weapon,potential] })) } -},[p.GetData]) +},[p]) //console.log(p.GetData("class",p.className,"icon")) @@ -245,19 +244,19 @@ useEffect(()=>{ { effectPage===1?<>
  • Food Boost Effect
  • Shifta / Deband
  • Region Mag Boost
  • :<> } @@ -271,10 +270,10 @@ useEffect(()=>{
    -
    {setModalOpen(true)}} className="equipPaletteSlot">

    Weapons

    1
    -

    Armor 1

    -

    Armor 2

    -

    Armor 3

    +
    {setModalOpen(true)}} className="equipPaletteSlot">

    Weapons

    1
    +

    Armor 1

    +

    Armor 2

    +

    Armor 3

    @@ -289,23 +288,23 @@ useEffect(()=>{

    Abilitiy Details

    {weaponPage===1? : }
    @@ -361,9 +360,9 @@ useEffect(()=>{ Weapon Up -  +{(p.weaponUp1*100).toFixed(1)}%
    -  +{(p.weaponUp3*100).toFixed(1)}% -  +{(p.weaponUp2*100).toFixed(1)}% +  +{(p.weaponUp1*100).toFixed(1)}%
    +  +{(p.weaponUp3*100).toFixed(1)}% +  +{(p.weaponUp2*100).toFixed(1)}%   @@ -461,16 +460,16 @@ useEffect(()=>{ switch (tabPage) { case 2:{ return item[0].name==="Assault Rifle" - }break; + } case 3:{ return item[0].name==="Launcher" - }break; + } case 4:{ return item[0].name==="Rod" - }break; + } case 5:{ return item[0].name==="Talis" - }break; + } default:{ return true } @@ -485,10 +484,10 @@ useEffect(()=>{ switch (sortSelector) { case "Rarity":{ return b[1].rarity-a[1].rarity - }break; + } case "Attack":{ return b[1].atk-a[1].atk - }break; + } default:{ return 0 }