From 5e6dc8b15bf35f9d3f8acc2f83e8b30aad1334af Mon Sep 17 00:00:00 2001 From: Pedro Rezende Date: Mon, 30 Dec 2024 11:16:27 -0300 Subject: [PATCH] feat: starting to remove framer-motion --- .../App/Sidebars/YourStakingDistribution.tsx | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/apps/namadillo/src/App/Sidebars/YourStakingDistribution.tsx b/apps/namadillo/src/App/Sidebars/YourStakingDistribution.tsx index 6faedf7908..a075b1d950 100644 --- a/apps/namadillo/src/App/Sidebars/YourStakingDistribution.tsx +++ b/apps/namadillo/src/App/Sidebars/YourStakingDistribution.tsx @@ -1,8 +1,10 @@ import { PieChart, PieChartData } from "@namada/components"; import { shortenAddress } from "@namada/utils"; import BigNumber from "bignumber.js"; -import { AnimatePresence, motion } from "framer-motion"; +import clsx from "clsx"; +import { AnimatePresence } from "framer-motion"; import { useState } from "react"; +import { twMerge } from "tailwind-merge"; import { MyValidator } from "types"; type YourStakingDistributionProps = { @@ -62,29 +64,34 @@ export const YourStakingDistribution = ({ setDisplayedValidator(myValidators[index]); }} > -
+
- {displayedValidator === undefined && ( - - Your Stake Distribution - - )} - {displayedValidator && ( - - {displayedValidator.validator.alias} - - {getFormattedPercentage(displayedValidator)} - - - )} + + Your Stake Distribution + + + {displayedValidator?.validator.alias} + + {displayedValidator && + getFormattedPercentage(displayedValidator)} + +