diff --git a/pages/referral.tsx b/pages/referral.tsx index 1b5e226f..c513a9d9 100644 --- a/pages/referral.tsx +++ b/pages/referral.tsx @@ -10,7 +10,7 @@ import { mangoGroupSelector, walletSelector, } from '../stores/selectors' -import { IconButton, LinkButton } from '../components/Button' +import { IconButton } from '../components/Button' import { abbreviateAddress, copyToClipboard } from '../utils' import { notify } from '../utils/notifications' import { @@ -27,7 +27,6 @@ import { } from '@heroicons/react/outline' import { MngoMonoIcon } from '../components/icons' import Link from 'next/link' -import Modal from '../components/Modal' import { Table, Td, Th, TrBody, TrHead } from '../components/TableElements' import dayjs from 'dayjs' import AccountsModal from '../components/AccountsModal' @@ -85,7 +84,6 @@ export default function Referral() { ReferrerIdRecord[] >([]) const [hasCopied, setHasCopied] = useState(null) - const [showMoreInfoModal, setShowMoreInfoModal] = useState(false) const [showAccountsModal, setShowAccountsModal] = useState(false) const [hasReferrals] = useState(false) // Placeholder to show/hide users referral stats const [loading, setLoading] = useState(false) @@ -170,11 +168,13 @@ export default function Referral() { const hasRequiredMngo = mangoGroup && mangoAccount - ? mangoAccount.getUiDeposit( - mangoCache.rootBankCache[mngoIndex], - mangoGroup, - mngoIndex - ) + ? mangoAccount + .getUiDeposit( + mangoCache.rootBankCache[mngoIndex], + mangoGroup, + mngoIndex + ) + .toNumber() > 10000 : false const hasCustomRefLinks = existingCustomRefLinks && existingCustomRefLinks.length > 0 @@ -192,12 +192,6 @@ export default function Referral() { Earn 16% of the perp fees paid by anyone you refer. Plus, they get a 4% perp fee discount.

- setShowMoreInfoModal(true)} - > - More Info -
@@ -228,9 +222,30 @@ export default function Referral() {
) : null}
-
+
+
+

Program Details

+
    +
  • + Your referral code is automatically applied whenever + your link is used to create an account. +
  • +
  • + When any of your referrals trade Mango Perps, you earn + 16% of their trade fees. +
  • +
  • + Plus, for using your link they get a 4% discount off + their Mango Perp fees. +
  • +
  • + You must have at least 10,000 MNGO in your Mango + Account to qualify for generating referrals and + earning referral rewards. +
  • +
+
-
{hasRequiredMngo ? (

Your Links

@@ -364,7 +379,7 @@ export default function Referral() { )}
{hasRequiredMngo ? ( -
+

Custom Referral Links

You can generate up to 5 custom referral links. @@ -518,32 +533,6 @@ export default function Referral() { )}

- {showMoreInfoModal ? ( - setShowMoreInfoModal(false)} - > -

Referral Program Details

-
    -
  • - Your referral code is automatically applied whenever your link is - used to create an account. -
  • -
  • - When any of your referrals trade Mango Perps, you earn 16% of - their trade fees. -
  • -
  • - Plus, for using your link they get a 4% discount off their Mango - Perp fees. -
  • -
  • - You must have at least 10,000 MNGO in your Mango Account to - qualify for generating referrals and earning referral rewards. -
  • -
-
- ) : null} {showAccountsModal ? ( setShowAccountsModal(false)}