Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix position airdrop tooltip #763

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/components/ConnectWalletPopup/MassaWallets/MASBalance.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { useEffect, useState } from 'react';

import { fromMAS } from '@massalabs/massa-web3';
import { FetchingLine, Tag, formatAmount } from '@massalabs/react-ui-kit';
import {
FetchingLine,
Tag,
Tooltip,
formatAmount,
} from '@massalabs/react-ui-kit';
import { IAccountBalanceResponse } from '@massalabs/wallet-provider';

import { FiHelpCircle } from 'react-icons/fi';
Expand Down Expand Up @@ -52,28 +57,23 @@ export function MASBalance() {
}

export function CustomInfoTag() {
const [showTooltip, setShowTooltip] = useState(false);
return (
<div
onMouseEnter={() => setShowTooltip(true)}
onMouseLeave={() => setShowTooltip(false)}
className="flex hover:cursor-pointer"
<Tooltip
body={
<div>
{Intl.t('connect-wallet.empty-balance-description', {
amount: AIRDROP_AMOUNT,
})}
</div>
}
>
<Tag type="info" customClass="flex items-center gap-2">
{Intl.t('connect-wallet.empty-balance', {
amount: AIRDROP_AMOUNT,
})}
{showTooltip && (
<div
className={`w-96 left-[480px] top-[515px] z-10 absolute bg-tertiary p-3 rounded-lg text-neutral ml-2`}
>
{Intl.t('connect-wallet.empty-balance-description', {
amount: AIRDROP_AMOUNT,
})}
</div>
)}

<FiHelpCircle className="text-s-info-1" />
</Tag>
</div>
</Tooltip>
);
}
2 changes: 1 addition & 1 deletion src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"speed-title": "Can I speed up an Ethereum transaction on the Massa Bridge?",
"speed-desc": " If Ethereum network load implies long confirmation times, increase the transaction fee in your Metamask wallet for faster processing.",
"what-token-title": "What token do I need to use to pay for transaction fees on the Massa network?",
"what-token-desc": "Massa network transactions require Massa’s native asset, the MAS token. When bridging to a new Massa address, you’ll receive 0.3 MAS for free, with 0.001 allocated for storing your address on the ledger and the rest for a few future transaction fees. ",
"what-token-desc": "Massa network transactions require Massa’s native asset, the MAS token. When bridging to a new Massa address, you’ll receive {amount} MAS for free, with 0.001 allocated for storing your address on the ledger and the rest for a few future transaction fees. ",
"what-token-desc-1": "Since June 2024, Massa nodes require a very small minimal transaction fees of 0.01 MAS.",
"zero-tx-fees-title": "Why are there low transaction fees on the Massa network?",
"zero-tx-fees-desc": "As Massa is a new network, chain activity is low enough to have very low transaction fees. As chain activity increases, transaction fees may also increase.",
Expand Down
Loading