diff --git a/src/components/v2v3/V2V3Project/ProjectDashboard/components/NftRewardsPanel/NftRewardsPanel.tsx b/src/components/v2v3/V2V3Project/ProjectDashboard/components/NftRewardsPanel/NftRewardsPanel.tsx index d502358c56..16b1a5a0cd 100644 --- a/src/components/v2v3/V2V3Project/ProjectDashboard/components/NftRewardsPanel/NftRewardsPanel.tsx +++ b/src/components/v2v3/V2V3Project/ProjectDashboard/components/NftRewardsPanel/NftRewardsPanel.tsx @@ -22,7 +22,7 @@ export const NftRewardsPanel = () => { {!nftsLoading && rewardTiers?.length ? (
{rewardTiers?.map((tier, i) => ( -
+
= ({ className }) => { { dispatch(payRedeemActions.changeToRedeem()) }} @@ -164,7 +165,7 @@ export const PayRedeemCard: React.FC = ({ className }) => { )} - {unclaimedTokenBalance?.gt(0) && ( + {projectHasErc20Token && unclaimedTokenBalance?.gt(0) && ( )} @@ -177,13 +178,18 @@ const ChoiceButton = ({ children, onClick, selected, + tooltip, disabled, }: { children: React.ReactNode onClick?: () => void selected?: boolean + tooltip?: ReactNode disabled?: boolean }) => { + if (disabled) { + tooltip = t`Disabled for this project` + } const Button = useMemo( () => (
@@ -574,10 +582,7 @@ const RedeemConfiguration: React.FC = ({ const tokenFromRedeemAmount = useMemo(() => { if (!redeemAmount) return '' - return formatCurrencyAmount({ - amount: fromWad(ethReceivedFromTokens), - currency: V2V3_CURRENCY_ETH, - }) + return formatAmount(fromWad(ethReceivedFromTokens)) }, [ethReceivedFromTokens, redeemAmount]) const insufficientBalance = useMemo(() => { @@ -779,6 +784,14 @@ const NftReward: React.FC<{ }) }, [removeNft]) + const handleDecreaseQuantity = useCallback(() => { + if (quantity - 1 <= 0) { + handleRemove() + } else { + decreaseQuantity() + } + }, [decreaseQuantity, handleRemove, quantity]) + const priceText = useMemo(() => { if (price === null) { return '-' @@ -812,7 +825,7 @@ const NftReward: React.FC<{
diff --git a/src/components/v2v3/V2V3Project/ProjectDashboard/components/ProjectTabs/ProjectTabs.tsx b/src/components/v2v3/V2V3Project/ProjectDashboard/components/ProjectTabs/ProjectTabs.tsx index f115880b89..2be343ed89 100644 --- a/src/components/v2v3/V2V3Project/ProjectDashboard/components/ProjectTabs/ProjectTabs.tsx +++ b/src/components/v2v3/V2V3Project/ProjectDashboard/components/ProjectTabs/ProjectTabs.tsx @@ -111,7 +111,7 @@ export const ProjectTabs = ({ className }: { className?: string }) => { defaultIndex={0} >
- + {tabs.map(tab => ( = ({ as="button" ref={tabRef} className={twMerge( - 'snap-start scroll-mx-4 outline-none first:ml-4 last:mr-4 md:ml-0 md:mr-0', + 'snap-start scroll-mx-4 outline-none first:ml-4 last:mr-4 md:ml-0 md:mr-0 md:first:ml-1 md:last:mr-0', className, )} onClick={onClick} diff --git a/src/locales/messages.pot b/src/locales/messages.pot index 2617e93716..c97df468b9 100644 --- a/src/locales/messages.pot +++ b/src/locales/messages.pot @@ -3392,6 +3392,9 @@ msgstr "" msgid "JB vs. Kickstarter" msgstr "" +msgid "Redeem tokens for a portion of this project's treasury" +msgstr "" + msgid "Available payout" msgstr ""