From a7c34fdb00f1e9752330dc2b8555e95ffc2c526f Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Wed, 25 Aug 2021 19:54:11 +0900 Subject: [PATCH] Include user password support. --- src/App.js | 2 ++ src/TestPanel.js | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/App.js b/src/App.js index 138a554..39f2d03 100644 --- a/src/App.js +++ b/src/App.js @@ -889,6 +889,7 @@ function App() { statDisplayAtk={statDisplayAtk} GetData={GetData} LOGGEDINUSER={LOGGEDINUSER} + LOGGEDINHASH={LOGGEDINHASH} BACKENDURL={GetBackendURL(BACKENDURL)} /> @@ -921,6 +922,7 @@ function App() { statDisplayAtk={statDisplayAtk} GetData={GetData} LOGGEDINUSER={LOGGEDINUSER} + LOGGEDINHASH={LOGGEDINHASH} BACKENDURL={GetBackendURL(BACKENDURL)} /> diff --git a/src/TestPanel.js b/src/TestPanel.js index 3362711..15b4803 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -296,7 +296,7 @@ let { BUILDID } = useParams() let history = useHistory(); let location = useLocation(); -const { GetData,LOGGEDINUSER,BACKENDURL,APP_TITLE } = p +const { GetData,LOGGEDINUSER,LOGGEDINHASH,BACKENDURL,APP_TITLE } = p const [bpGraphMax,setbpGraphMax] = useState(1000) const [hpGraphMax,sethpGraphMax] = useState(1000) @@ -333,10 +333,6 @@ const [classNameSetter,setClassNameSetter] = useState(0) const [points,setPoints] = useState([]) const [skillPointData,setSkillPointData] = useState([]) -useEffect(()=>{ - console.log(skillPointData) -},[skillPointData]) - function SaveData() { var saveObj = { level:level, @@ -352,6 +348,7 @@ function SaveData() { axios.post(BACKENDURL+"/submitBuild",{ id:BUILDID, username:LOGGEDINUSER, + pass:LOGGEDINHASH, creator:author, build_name:buildName, class1:className, @@ -367,8 +364,10 @@ function SaveData() { }) } -function LoadData() { - +function LoadData(build) { + if (build) { + + } } function rarityCheck(v) { @@ -407,7 +406,7 @@ useEffect(()=>{ },[className,GetData]) useEffect(()=>{ - console.log(BUILDID) + LoadData(BUILDID) },[BUILDID]) //console.log(p.GetData("class",p.className,"icon"))