clear unit param on nav, fix more import, fix NaN animation error
This commit is contained in:
1 parent
e73432dd26
commit
a2f0066c42
3 files changed
+4
-3
No files matched your search
@@ -25,7 +25,7 @@ export const MetricCard = ({
|
||||
showChange = false,
|
||||
}: MetricCardProps) => {
|
||||
const diff = value - change;
|
||||
const pct = ((value - diff) / diff) * 100;
|
||||
const pct = diff !== 0 ? ((value - diff) / diff) * 100 : value !== 0 ? 100 : 0;
|
||||
const props = useSpring({ x: Number(value) || 0, from: { x: 0 } });
|
||||
const changeProps = useSpring({ x: Number(pct) || 0, from: { x: 0 } });
|
||||
|
||||
|
||||
Reference in new issue
Block a user