diff --git a/src/components/Airdrop/Airdrop.tsx b/src/components/Airdrop/Airdrop.tsx index 0c270d9b..57e6d1e3 100644 --- a/src/components/Airdrop/Airdrop.tsx +++ b/src/components/Airdrop/Airdrop.tsx @@ -8,9 +8,8 @@ import { shortInteger } from "../../utils/computations"; import { isMainnet } from "../../constants/amm"; import { QueryKeys } from "../../queries/keys"; import { AirdropModal } from "./AirdropModal"; - -import buttonStyles from "../../style/button.module.css"; import airdropStyles from "./airdrop.module.css"; +import { formatNumber } from "../../utils/utils"; const ClaimAndStake = ({ account, @@ -28,10 +27,7 @@ const ClaimAndStake = ({ You are eligible to claim {amountHumanReadable} veCRM! - @@ -73,10 +69,10 @@ export const AirdropWithAccount = ({ if (data.eligible) { if (data.claimable === 0n) { - const amount = shortInteger(data.claimed, 18); + const amount = formatNumber(shortInteger(data.claimed, 18), 5); return ( ); } @@ -94,26 +90,15 @@ export const Airdrop = () => { if (!account) { return ( -
-

Airdrop

- -
+ ); } if (!isMainnet) { return ( -
-

Airdrop

- -
+ ); } - return ( -
-

Airdrop

- -
- ); + return ; }; diff --git a/src/components/Airdrop/AirdropModal.tsx b/src/components/Airdrop/AirdropModal.tsx index 9975ef40..a349eaa1 100644 --- a/src/components/Airdrop/AirdropModal.tsx +++ b/src/components/Airdrop/AirdropModal.tsx @@ -21,15 +21,13 @@ import { ToastType } from "../../redux/reducers/ui"; import { useState } from "react"; import { TransactionState, TxTracking } from "../../types/network"; import { LoadingAnimation } from "../Loading/Loading"; - -import styles from "./airdrop.module.css"; -import buttonStyles from "../../style/button.module.css"; - import GovernanceABI from "../../abi/governance_abi.json"; import TokenABI from "../../abi/lptoken_abi.json"; import { invalidateKey } from "../../queries/client"; import { QueryKeys } from "../../queries/keys"; +import styles from "./airdrop.module.css"; + export const claim = async ( account: AccountInterface, data: string[], @@ -144,15 +142,15 @@ type Props = { const stateToClassName = (state: TransactionState) => { if (state === TransactionState.Success) { - return buttonStyles.green; + return "mainbutton active green"; } if (state === TransactionState.Fail) { - return buttonStyles.fail; + return "mainbutton active red"; } if (state === TransactionState.Processing) { - return buttonStyles.disabled; + return "mainbutton active disabled"; } - return buttonStyles.secondary; + return "mainbutton active primary"; }; export const AirdropModal = ({ account, data, open, setOpen }: Props) => { @@ -239,7 +237,7 @@ export const AirdropModal = ({ account, data, open, setOpen }: Props) => { className={stateToClassName(monthState)} > {monthState === TransactionState.Processing && ( - + )} {monthState === TransactionState.Initial && "1 month"} {monthState === TransactionState.Success && "Done!"} @@ -253,7 +251,7 @@ export const AirdropModal = ({ account, data, open, setOpen }: Props) => { className={stateToClassName(sixMonthsState)} > {sixMonthsState === TransactionState.Processing && ( - + )} {sixMonthsState === TransactionState.Initial && "6 months"} {sixMonthsState === TransactionState.Success && "Done!"} @@ -267,7 +265,7 @@ export const AirdropModal = ({ account, data, open, setOpen }: Props) => { className={stateToClassName(yearState)} > {yearState === TransactionState.Processing && ( - + )} {yearState === TransactionState.Initial && "1 year"} {yearState === TransactionState.Success && "Done!"} diff --git a/src/components/Airdrop/airdrop.module.css b/src/components/Airdrop/airdrop.module.css index 10537927..a30f2eb3 100644 --- a/src/components/Airdrop/airdrop.module.css +++ b/src/components/Airdrop/airdrop.module.css @@ -1,24 +1,17 @@ .container { display: flex; flex-flow: row; - border: 1px solid white; - padding: 25px 50px; } .textcontainer { flex-flow: row; - border: 1px solid white; - padding: 25px 50px; - display: inline-block; } .claim { - border: 1px solid white; display: inline-flex; align-items: center; justify-content: flex-start; gap: 50px; - padding: 20px 50px; } .active { @@ -46,6 +39,7 @@ display: flex; justify-content: space-between; align-items: center; + gap: 5px; } .singlebutton { @@ -60,7 +54,6 @@ align-items: center; justify-content: center; gap: 50px; - padding: 20px 50px; } .buttongroup { diff --git a/src/components/AvnuWidget/TokenSelect.tsx b/src/components/AvnuWidget/TokenSelect.tsx index 38977644..48031fcc 100644 --- a/src/components/AvnuWidget/TokenSelect.tsx +++ b/src/components/AvnuWidget/TokenSelect.tsx @@ -33,7 +33,7 @@ export const TokenSelect = ({ close, setSelection, other }: Props) => { return (
-

Select a token

+

Select a token

diff --git a/src/components/CarmineStaking/StakeCRM.tsx b/src/components/CarmineStaking/StakeCRM.tsx index 702513c3..90814443 100644 --- a/src/components/CarmineStaking/StakeCRM.tsx +++ b/src/components/CarmineStaking/StakeCRM.tsx @@ -158,8 +158,7 @@ export const StakeCrm = ({ account, carmBalance }: Props) => { />
- -
+