diff --git a/src/App.js b/src/App.js index ec21253..2fe8355 100644 --- a/src/App.js +++ b/src/App.js @@ -1088,7 +1088,8 @@ function App() { /> + BACKENDURL={GetBackendURL(BACKENDURL)} + PANELPATHWBUILD={PANELPATHWBUILD}/> diff --git a/src/Builds.js b/src/Builds.js index 0a4a25d..27df106 100644 --- a/src/Builds.js +++ b/src/Builds.js @@ -4,38 +4,42 @@ import ReactPlaceholder from 'react-placeholder'; import "react-placeholder/lib/reactPlaceholder.css"; import {HandThumbsUp} from 'react-bootstrap-icons' import { DisplayIcon } from './DEFAULTS'; +import { HashLink as Link } from 'react-router-hash-link'; const axios = require('axios'); function Build(p) { + const {PANELPATHWBUILD} = p const {build} = p const {GetData} = p const buildData = build.data?build.data[0]==='{'?JSON.parse(build.data):{}:{} return

-
-
#{build.id}

 {build.build_name}

(Created by {build.creator})
-
{build.likes}
-
-
{buildData?.level}
-
{buildData?.secondaryLevel}
-
{build.created_on}
-
-
-
- -
-
- -
-
- -
-
- -
-
- {/*JSON.stringify(build)*/} -
+ +
+
#{build.id}

 {build.build_name}

(Created by {build.creator})
+
{build.likes}
+
+
{buildData?.level}
+
{buildData?.secondaryLevel}
+
{build.created_on}
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ {/*JSON.stringify(build)*/} +
+


@@ -44,18 +48,20 @@ function Build(p) { function Builds(p) { - const {GetData,BACKENDURL} = p + const {GetData,BACKENDURL,PANELPATHWBUILD} = p const [builds,setBuilds] = useState([]) const [sort,setSort] = useState("date_updated") const [filter,setFilter] = useState("") const [filter_type,setFilterType] = useState("") const [page,setPage] = useState(0) + const [finished,setFinished] = useState(false) useEffect(()=>{ axios.get(`${BACKENDURL}/getBuilds?sort_type=${sort}${filter_type!==""?`&filter_type=${filter_type}`:""}${filter_type!==""?`&filter=${encodeURI(filter)}`:""}${page!==0?`&offset=${page}`:""}`) .then((data)=>{ setBuilds(data.data) + setFinished(true) }) },[BACKENDURL,sort,filter_type,filter,page]) @@ -64,7 +70,9 @@ function Builds(p) {

Builds List

- {builds.map((build)=>)} + + {builds.map((build)=>)} +
} diff --git a/src/TestPanel.js b/src/TestPanel.js index 85a3a25..e72afac 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -467,6 +467,8 @@ const [prevFoodPointData,setPrevFoodPointData] = useState({}) const [BUFFS,setBUFFS] = useState({}) +const [buildLoad,setBuildLoad] = useState(false) + function SaveData() { var saveObj = { level:level, @@ -537,6 +539,7 @@ useEffect(()=>{ useEffect(()=>{ if (BUILDID) { + setBuildLoad(false) axios.get(BACKENDURL+"/getBuild?id="+BUILDID) .then((data)=>{ setAuthor(data.data.creator) @@ -570,6 +573,11 @@ useEffect(()=>{ .catch((err)=>{ console.log(err.message) }) + .finally(()=>{ + setBuildLoad(true) + }) + } else { + setBuildLoad(true) } },[BUILDID,GetData,BACKENDURL,p]) @@ -625,11 +633,11 @@ function deepCopySkills(skillData) {
- -
+

Basic Information

+
Author
Build Name
@@ -673,17 +681,21 @@ function deepCopySkills(skillData) {
-
+ + + + +

Equip

-
{setWeaponSelectWindowOpen(true)}} className="equipPaletteSlot">

Weapons

1
-
{setArmorSlotSelection(1);setArmorSelectWindowOpen(true)}} className={"equipPaletteSlot"+rarityCheck(selectedArmor1)}>

Armor 1

-
{setArmorSlotSelection(2);setArmorSelectWindowOpen(true)}} className={"equipPaletteSlot"+rarityCheck(selectedArmor2)}>

Armor 2

-
{setArmorSlotSelection(3);setArmorSelectWindowOpen(true)}} className={"equipPaletteSlot"+rarityCheck(selectedArmor3)}>

Armor 3

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

Weapons

1
+
{setArmorSlotSelection(1);setArmorSelectWindowOpen(true)}} className={"equipPaletteSlot"+rarityCheck(selectedArmor1)}>

Armor 1

+
{setArmorSlotSelection(2);setArmorSelectWindowOpen(true)}} className={"equipPaletteSlot"+rarityCheck(selectedArmor2)}>

Armor 2

+
{setArmorSlotSelection(3);setArmorSelectWindowOpen(true)}} className={"equipPaletteSlot"+rarityCheck(selectedArmor3)}>

Armor 3

@@ -695,7 +707,7 @@ function deepCopySkills(skillData) {

Equipped Weapon

- +

{GetSpecialWeaponName(selectedWeapon)}

@@ -824,7 +836,7 @@ function deepCopySkills(skillData) {

Current Effects

- + {effectPage===1?<>

Effect Name

  • {setPrevFoodPointData({...foodPointData});setFoodMenuWindowOpen(true)}}>Food Boost Effect
      @@ -849,6 +861,7 @@ function deepCopySkills(skillData) {

      Damage Stats

      + @@ -898,6 +911,7 @@ function deepCopySkills(skillData) { }
      +