Adds tooltips from react-tooltip to the statistics window. The tooltips clarify info or provide numerical values with more precision (2 decimal places).
Bug Fixes / Minor Changes
Remove Math.round() calls in calculations of metrics like WPM and accuracy, and instead call it for each given value when rendering the JSX. This allows for reuse of the variable when using toFixed() to round floats to a desired precision for the tooltips.
Why
Keeps a minimal interface at-a-glance, but provides some feedback to the user if they decide to hover over it.
Changes
Major Changes
Adds tooltips from react-tooltip to the statistics window. The tooltips clarify info or provide numerical values with more precision (2 decimal places).
Bug Fixes / Minor Changes
Math.round()
calls in calculations of metrics like WPM and accuracy, and instead call it for each given value when rendering the JSX. This allows for reuse of the variable when usingtoFixed()
to round floats to a desired precision for the tooltips.Why
Keeps a minimal interface at-a-glance, but provides some feedback to the user if they decide to hover over it.
How
Use of the react-tooltip library.
Notes
N/A