From b3fe3f81b4c87641b0263f196aa60e5614cbcad7 Mon Sep 17 00:00:00 2001 From: Sendou <38327916+Sendouc@users.noreply.github.com> Date: Wed, 27 May 2020 15:12:35 +0300 Subject: [PATCH] swim speed to fixed --- .../src/components/analyzer/BuildStats.tsx | 1 - .../src/components/analyzer/StatChart.tsx | 13 +++++-------- frontend-react/src/hooks/useAbilityEffects.ts | 3 ++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/frontend-react/src/components/analyzer/BuildStats.tsx b/frontend-react/src/components/analyzer/BuildStats.tsx index 5b7bc3bd8..0df997a24 100644 --- a/frontend-react/src/components/analyzer/BuildStats.tsx +++ b/frontend-react/src/components/analyzer/BuildStats.tsx @@ -163,7 +163,6 @@ const BuildStats: React.FC = ({ ap={ap} otherAp={otherAp} getEffect={getEffect} - ability={ability} startChartsAtZero={startChartsAtZero} /> diff --git a/frontend-react/src/components/analyzer/StatChart.tsx b/frontend-react/src/components/analyzer/StatChart.tsx index a65f0b46e..a1749fd5d 100644 --- a/frontend-react/src/components/analyzer/StatChart.tsx +++ b/frontend-react/src/components/analyzer/StatChart.tsx @@ -1,16 +1,15 @@ import React, { useContext } from "react" import { - ResponsiveContainer, - LineChart, CartesianGrid, - XAxis, - YAxis, - Tooltip, Legend, Line, + LineChart, + ResponsiveContainer, + Tooltip, + XAxis, + YAxis, } from "recharts" import MyThemeContext from "../../themeContext" -import { Ability } from "../../types" import { possibleAps } from "../../utils/lists" interface StatChartProps { @@ -18,7 +17,6 @@ interface StatChartProps { getEffect: (ap: number) => number ap: number otherAp?: number - ability: Ability startChartsAtZero: boolean } @@ -27,7 +25,6 @@ const StatChart: React.FC = ({ ap, otherAp, getEffect, - ability, startChartsAtZero, }) => { const { themeColorHex, darkerBgColor } = useContext(MyThemeContext) diff --git a/frontend-react/src/hooks/useAbilityEffects.ts b/frontend-react/src/hooks/useAbilityEffects.ts index a23d4d051..336f43d4d 100644 --- a/frontend-react/src/hooks/useAbilityEffects.ts +++ b/frontend-react/src/hooks/useAbilityEffects.ts @@ -490,7 +490,8 @@ export default function useAbilityEffects( effectFromMaxActual: (speed / 2.4) * 100, ability: "SSU" as Ability, ap: amount, - getEffect: (ap: number) => getEffect(highMidLow, ap)[0], + getEffect: (ap: number) => + parseFloat(getEffect(highMidLow, ap)[0].toFixed(3)), }, ] }