swim speed to fixed

This commit is contained in:
Sendou
2020-05-27 15:12:35 +03:00
parent 992093345d
commit b3fe3f81b4
3 changed files with 7 additions and 10 deletions

View File

@@ -163,7 +163,6 @@ const BuildStats: React.FC<BuildStatsProps> = ({
ap={ap}
otherAp={otherAp}
getEffect={getEffect}
ability={ability}
startChartsAtZero={startChartsAtZero}
/>
</Box>

View File

@@ -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<StatChartProps> = ({
ap,
otherAp,
getEffect,
ability,
startChartsAtZero,
}) => {
const { themeColorHex, darkerBgColor } = useContext(MyThemeContext)

View File

@@ -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)),
},
]
}