From 91dc5ce087c8444e7124ff8b59634093a9b23700 Mon Sep 17 00:00:00 2001 From: Sendou <38327916+Sendouc@users.noreply.github.com> Date: Mon, 25 May 2020 20:34:57 +0300 Subject: [PATCH] lde slider --- .../components/analyzer/BuildAnalyzerPage.tsx | 15 ++++- .../components/analyzer/EditableBuilds.tsx | 21 +++++++ .../src/components/analyzer/LdeSlider.tsx | 55 +++++++++++++++++++ frontend-react/src/hooks/useAbilityEffects.ts | 18 ++++-- 4 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 frontend-react/src/components/analyzer/LdeSlider.tsx diff --git a/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx b/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx index 6d97a9978..b157c9e96 100644 --- a/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx +++ b/frontend-react/src/components/analyzer/BuildAnalyzerPage.tsx @@ -29,13 +29,20 @@ const BuildAnalyzerPage: React.FC = () => { const [otherFocused, setOtherFocused] = useState(false) const [hideExtra, setHideExtra] = useState(true) const [showSettings, setShowSettings] = useState(false) + const [bonusAp, setBonusAp] = useState>>({}) const [otherBonusAp, setOtherBonusAp] = useState< Partial> >({}) + const [lde, setLde] = useState(0) + const [otherLde, setOtherLde] = useState(0) - const explanations = useAbilityEffects(build, bonusAp) - const otherExplanations = useAbilityEffects(otherBuild, otherBonusAp) + const explanations = useAbilityEffects(build, bonusAp, lde) + const otherExplanations = useAbilityEffects( + otherBuild, + otherBonusAp, + otherLde + ) return ( <> @@ -76,6 +83,10 @@ const BuildAnalyzerPage: React.FC = () => { setBonusAp={setBonusAp} otherBonusAp={otherBonusAp} setOtherBonusAp={setOtherBonusAp} + lde={lde} + setLde={setLde} + otherLde={otherLde} + setOtherLde={setOtherLde} /> )}