Skip to content

Commit

Permalink
APT-1620-APR-basic-tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorginaShall committed Dec 27, 2024
1 parent 23a6a03 commit 6dd294e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/components/stakingCalculator.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StakingPoolsStorage } from "@/contexts/stakingPoolsStorage";
import { useEffect, useState } from "react";
import { Button, Input } from "antd";
import { Button, Input, Tooltip } from "antd";
import { WalletConnector } from "@/contexts/walletConnector";
import { formatPercentage, convertZilValueInToken, getTxExplorerUrl, formatAddress } from "@/misc/formatting";
import { formatUnits, parseEther } from "viem";
Expand Down Expand Up @@ -168,7 +168,9 @@ const StakingCalculator: React.FC = () => {
)}
</div>
<div className=" regular-base text-aqua1 flex flex-row xl:gap-5">
<div>APR:</div>
<Tooltip placement='top' arrow={true} color='#686A6C' className=' mr-1' title="Annual Percentage Rate">
<span>APR </span>
</Tooltip>
{stakingPoolForView!.stakingPool.data ? (
<>
~{formatPercentage(
Expand Down
10 changes: 8 additions & 2 deletions src/components/stakingPoolCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { formatPercentage, formatUnitsToHumanReadable } from '@/misc/formatting';
import { StakingPool } from '@/misc/stakingPoolsConfig';
import { UserStakingPoolData } from '@/misc/walletsConfig';
import { Tooltip } from 'antd';
import Image from 'next/image';

interface StakingPoolCardProps {
Expand Down Expand Up @@ -108,8 +109,13 @@ const StakingPoolCard: React.FC<StakingPoolCardProps> = ({
}
</div>
</div>
<div className="flex base text-gray2 max-md:order-1 ">
APR{' '}


<div className="flex base text-gray2 max-md:order-1 ">
<Tooltip placement='top' arrow={true} color='#686A6C' className=' mr-1' title="Annual Percentage Rate">
<span>APR </span>
</Tooltip>

{
stakingPoolData.data ? (
<>
Expand Down
6 changes: 4 additions & 2 deletions src/components/unstakingCalculator.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StakingPoolsStorage } from '@/contexts/stakingPoolsStorage';
import { useEffect, useState } from 'react';
import { Button, Input } from 'antd';
import { Button, Input, Tooltip } from 'antd';
import {
formatPercentage,
convertTokenToZil,
Expand Down Expand Up @@ -186,7 +186,9 @@ const UnstakingCalculator: React.FC = () => {
</div>
</div>
<div className=" regular-base flex flex-row xl:gap-5">
<div>APR:</div>
<Tooltip placement='top' arrow={true} color='#686A6C' className=' mr-1' title="Annual Percentage Rate">
<span>APR </span>
</Tooltip>
{stakingPoolForView!.stakingPool.data ? (
<>
~
Expand Down

0 comments on commit 6dd294e

Please sign in to comment.