diff --git a/src/App.js b/src/App.js
index 737edac..a46465a 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,6 +1,5 @@
-import logo from './logo.svg';
import './App.css';
-import React, {useState,useEffect,useRef,useReducer} from 'react';
+import React, {useState,useEffect} from 'react';
function Col(p) {
return
@@ -18,15 +17,12 @@ function Box(p) {
}
function EditBox(p) {
- const [loaded,setLoaded] = useState(false)
useEffect(()=>{
setTimeout(()=>{document.getElementById("editBox").focus()},100)
- setLoaded(true)
})
-return
{
- if (e.key==="Enter") {p.setEdit(false)}
-}} maxLength={p.maxlength?p.maxlength:20} onBlur={()=>{p.setEdit(false)}} value={p.value} onChange={(f)=>{f.currentTarget.value.length>0?p.setName(f.currentTarget.value):p.setName(p.originalName)}}>
-
+ return
{
+ if (e.key==="Enter") {p.setEdit(false)}
+ }} maxLength={p.maxlength?p.maxlength:20} onBlur={()=>{p.setEdit(false)}} value={p.value} onChange={(f)=>{f.currentTarget.value.length>0?p.setName(f.currentTarget.value):p.setName(p.originalName)}}>
}
@@ -119,14 +115,14 @@ const ABILITY_DEFAULT_ICON = "icons/UINGSItemSpecialAbility.png"
function Class(p) {
const class_obj = CLASSES[p.name]
- return <>
![]({class_obj.icon}/)
{class_obj.name}>
+ return <>
![]({class_obj.icon}/)
{class_obj.name}>
}
function ClassSelector(p){
return
Class Selector
{Object.keys(CLASSES).map((cl,i)=>{
- return
+ return
})}
}
@@ -175,7 +171,7 @@ function EffectListing(p) {
}
function PageControlButton(p) {
- return
{p.setCurrentPage(p.page)}} className={(p.currentPage==p.page)?"selected":""}>{p.pageName?p.pageName:p.page}
+ return
{p.setCurrentPage(p.page)}} className={(p.currentPage===p.page)?"selected":""}>{p.pageName?p.pageName:p.page}
}
function PageControl(p) {
@@ -195,7 +191,7 @@ function EffectsBox(p) {
Effect Name
{
- currentPage==1?
+ currentPage===1?
{p.effectList.map((ef,i)=>{
return
@@ -225,28 +221,28 @@ function EquippedWeaponBox(p) {
useEffect(()=>{
switch (currentPage) {
- case 2:{
+ case 2:
setSelectedEquip(p.armorSlot1)
setSelectedEquipEnhancementLv(p.armorSlot1EnhancementLv)
setSelectedEquipAbilities(p.armorSlot1AbilityList)
- }break;
- case 3:{
+ break;
+ case 3:
setSelectedEquip(p.armorSlot2)
setSelectedEquipEnhancementLv(p.armorSlot2EnhancementLv)
setSelectedEquipAbilities(p.armorSlot2AbilityList)
- }break;
- case 4:{
+ break;
+ case 4:
setSelectedEquip(p.armorSlot3)
setSelectedEquipEnhancementLv(p.armorSlot3EnhancementLv)
setSelectedEquipAbilities(p.armorSlot3AbilityList)
- }break;
+ break;
default:{
setSelectedEquip(p.weapon)
setSelectedEquipEnhancementLv(p.weaponEnhancementLv)
setSelectedEquipAbilities(p.weaponAbilityList)
}
}
- },[currentPage])
+ },[currentPage,p.armorSlot1,p.armorSlot1EnhancementLv,p.armorSlot1AbilityList,p.armorSlot2,p.armorSlot2EnhancementLv,p.armorSlot2AbilityList,p.armorSlot3,p.armorSlot3EnhancementLv,p.armorSlot3AbilityList,p.weapon,p.weaponEnhancementLv,p.weaponAbilityList])
return
{selectedEquip}+{selectedEquipEnhancementLv}
@@ -281,7 +277,7 @@ function DamageBox(p) {
{
- currentPage==1&&
+ currentPage===1&&
{p.criticalHitRate*100}%
{p.criticalMultiplier*100}%
@@ -358,7 +354,7 @@ function App() {
-
+