From 51e12ef15738992b5c8e94a1ee29bcbe041fb5fe Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Sun, 8 Aug 2021 03:57:07 +0900 Subject: [PATCH] No more warnings! Co-authored-by: dudleycu --- src/App.js | 14 +++++----- src/TestPanel.js | 71 ++++++++++++++++++++++++------------------------ 2 files changed, 42 insertions(+), 43 deletions(-) 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
      -
    •  [Meat] Potency +10.0%
    • -
    •  [Crisp] Potency to Weak Point +5.0%
    • +
    •  [Meat] Potency +10.0%
    • +
    •  [Crisp] Potency to Weak Point +5.0%
  • Shifta / Deband
      -
    •  Potency +5.0%
    • -
    •  Damage Resistance +10.0%
    • +
    •  Potency +5.0%
    • +
    •  Damage Resistance +10.0%
  • Region Mag Boost
      -
    •  Potency +5.0%
    • +
    •  Potency +5.0%
  • :<> } @@ -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?
      -
    • } tooltip={<>Potency +20%/
      Critical Hit Rage +15% for 30 seconds after a successful sidestep}/>Dynamo Unit Lv.3
    • -
    • } tooltip={<>Potency +4%}/>Fixa Attack Lv.3
    • -
    • } tooltip={<>PP +5
      Ranged Weapon Potency +2.0%}/>Pettas Soul II
    • -
    • } tooltip={<>HP -10, Potency +1.5%,
      Potency Floor Increase +1.5%
      Damage Resistance -1.5%}/>Alts Secreta II
    • -
    • } tooltip={<>HP +10
      Ranged Weapon Potency +2.0%}/>Gigas Precision II
    • -
    • } tooltip={<>Ranged Weapon Potency +2.0%}/>Precision III
    • -
    • +
    • } tooltip={<>Potency +20%/
      Critical Hit Rage +15% for 30 seconds after a successful sidestep}/>Dynamo Unit Lv.3
    • +
    • } tooltip={<>Potency +4%}/>Fixa Attack Lv.3
    • +
    • } tooltip={<>PP +5
      Ranged Weapon Potency +2.0%}/>Pettas Soul II
    • +
    • } tooltip={<>HP -10, Potency +1.5%,
      Potency Floor Increase +1.5%
      Damage Resistance -1.5%}/>Alts Secreta II
    • +
    • } tooltip={<>HP +10
      Ranged Weapon Potency +2.0%}/>Gigas Precision II
    • +
    • } tooltip={<>Ranged Weapon Potency +2.0%}/>Precision III
    • +
    :
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    }
    @@ -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 }