diff --git a/packages/app/package.json b/packages/app/package.json index 1aef99f9..46bc6aed 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -89,6 +89,7 @@ ] }, "devDependencies": { + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@marinade.finance/marinade-ts-sdk": "^4.0.4", "cross-env": "^7.0.3" }, diff --git a/packages/app/src/common/components/modals/LockWarningModal.tsx b/packages/app/src/common/components/modals/LockWarningModal.tsx index 91f4d2af..63e05274 100644 --- a/packages/app/src/common/components/modals/LockWarningModal.tsx +++ b/packages/app/src/common/components/modals/LockWarningModal.tsx @@ -1,9 +1,8 @@ import { Dialog } from "@headlessui/react"; import { ExclamationTriangleIcon } from "@heroicons/react/24/solid"; -import React, { type FC } from "react"; +import { type FC } from "react"; import { BaseModal, type ModalProps } from "./"; -import { MangroveButton } from "../../../rewards/components/MangroveButton"; const LockWarningModal: FC = (props) => { return ( @@ -28,10 +27,6 @@ const LockWarningModal: FC = (props) => { Locked gSOL will be available to unlock after one full epoch (2-3 days).

- -

- To earn a bonus Mangrove NFT, you must lock at least 0.5 gSOL. -

diff --git a/packages/app/src/grow/components/PartnerButton.tsx b/packages/app/src/grow/components/PartnerButton.tsx index a6fd46e8..d2053e1c 100644 --- a/packages/app/src/grow/components/PartnerButton.tsx +++ b/packages/app/src/grow/components/PartnerButton.tsx @@ -6,8 +6,8 @@ type PartnerProps = PropsWithChildren & { partner: Partner }; const ExternalPartner: FC = ({ children, partner }) => ( = ({ children, partner }) => ( const InternalPartner: FC = ({ children, partner }) => ( { @@ -123,21 +118,6 @@ const _HubApp: ForwardRefRenderFunction< }); }, [active, currentHelpRoute, showHubNav, showWalletButton]); - // show alerts 3s after hub nav is shown - useEffect(() => { - if (!showHubNav) { - updateShowAlerts(false); - return; - } - - const timer = setTimeout(() => { - updateShowAlerts(showHubNav); - }, 3000); - return () => { - clearTimeout(timer); - }; - }, [showHubNav]); - return (
Lock - {showLockAlert && } - {showAlerts && }

Start reducing CO2 emissions -
- -
diff --git a/packages/app/src/locking/LockingApp.tsx b/packages/app/src/locking/LockingApp.tsx index fe5016fb..b18db777 100644 --- a/packages/app/src/locking/LockingApp.tsx +++ b/packages/app/src/locking/LockingApp.tsx @@ -27,7 +27,6 @@ import { useWallet } from "@solana/wallet-adapter-react"; import { useNFTs } from "../common/context/NFTsContext"; import { LockDetailsView } from "./LockDetails"; import { detailsIndicateUpgradePossible } from "./utils"; -import { MangroveButton } from "../rewards/components/MangroveButton"; import { useScript } from "../common/hooks"; import { LockForm } from "./LockForm"; import { LockingSuccessModal } from "./LockingSuccessModal"; @@ -187,9 +186,6 @@ const _LockingApp: ForwardRefRenderFunction<

Lock gSOL to receive an Impact NFT

-
- -
)} {details?.impactNFTDetails && ( diff --git a/packages/app/src/locking/LockingSuccessModal.tsx b/packages/app/src/locking/LockingSuccessModal.tsx index d31e58aa..4ecb6438 100644 --- a/packages/app/src/locking/LockingSuccessModal.tsx +++ b/packages/app/src/locking/LockingSuccessModal.tsx @@ -1,22 +1,14 @@ -import { MangroveFormButton } from "../rewards/components/MangroveFormButton"; import { LockTweetButton } from "./LockTweetButton"; import { InfoModal } from "../common/components/modals/InfoModal"; -import React, { type FC } from "react"; +import { type FC } from "react"; import { type ModalControl } from "../common/hooks"; -import { LAMPORTS_PER_SOL } from "@solana/web3.js"; -import BN from "bn.js"; -import { solToLamports } from "../common/utils"; - -const LOCK_REWARD_AMOUNT = new BN(0.5 * LAMPORTS_PER_SOL); // 0.5 SOL in lamports export const LockingSuccessModal: FC<{ control: ModalControl; amount: string; }> = ({ control, amount }) => { - const eligibleForReward = solToLamports(amount).gte(LOCK_REWARD_AMOUNT); return ( - {eligibleForReward && } ); diff --git a/packages/app/src/rewards/components/MangroveButton.tsx b/packages/app/src/rewards/components/MangroveButton.tsx deleted file mode 100644 index 370abdfd..00000000 --- a/packages/app/src/rewards/components/MangroveButton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { Button } from "../../common/components"; -import { useInfoModal } from "../../common/hooks/useInfoModal"; -import { MangroveModal } from "./MangroveModal"; -import React, { type FC } from "react"; - -export const MangroveButton: FC = () => { - const infoModal = useInfoModal(); - return ( -
- - -
- ); -}; diff --git a/packages/app/src/rewards/components/MangroveDetails.tsx b/packages/app/src/rewards/components/MangroveDetails.tsx deleted file mode 100644 index 99288aea..00000000 --- a/packages/app/src/rewards/components/MangroveDetails.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import { ChevronDownIcon } from "@heroicons/react/20/solid"; -import clx from "classnames"; -import React, { type FC, useRef, useState } from "react"; - -interface Props { - className?: string; -} -const MangroveDetails: FC = ({ className }) => { - const [isShowing, setIsShowing] = useState(false); - const [isVisible, setIsVisible] = useState(false); - - const timeoutRef = useRef(undefined); - - return ( - <> - - -
-
-

- Mangroves are trees that grow in salt water and are one of the most - effective carbon sinks on the planet. They are also a critical habitat - for many species of fish and birds. -

-

- For more details, visit{" "} - - PanaSea - -

-
- - ); -}; - -export { MangroveDetails }; diff --git a/packages/app/src/rewards/components/MangroveFormButton.tsx b/packages/app/src/rewards/components/MangroveFormButton.tsx deleted file mode 100644 index ac2675f1..00000000 --- a/packages/app/src/rewards/components/MangroveFormButton.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import React, { type FC } from "react"; -import { useScript } from "../../common/hooks"; - -export const MangroveFormButton: FC = () => { - useScript("//embed.typeform.com/next/embed.js"); - return ( - <> -

You are eligible for a Mangrove NFT!

- - - ); -}; diff --git a/packages/app/src/rewards/components/MangroveIcon.tsx b/packages/app/src/rewards/components/MangroveIcon.tsx deleted file mode 100644 index 5bbaecf5..00000000 --- a/packages/app/src/rewards/components/MangroveIcon.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { AttentionIcon } from "../../common/components/AttentionIcon"; -import React, { type FC } from "react"; -import { useInfoModal } from "../../common/hooks/useInfoModal"; -import { MangroveModal } from "./MangroveModal"; - -export const MangroveIcon: FC = () => { - const infoModal = useInfoModal(); - return ( - <> - - { - infoModal.trigger(); - e.preventDefault(); - }} - /> - - ); -}; diff --git a/packages/app/src/rewards/components/MangroveModal.tsx b/packages/app/src/rewards/components/MangroveModal.tsx deleted file mode 100644 index 1bebd235..00000000 --- a/packages/app/src/rewards/components/MangroveModal.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import mangrove from "./mangrove.png"; -import { MangroveDetails } from "./MangroveDetails"; -import { InfoModal } from "../../common/components/modals/InfoModal"; -import React, { type FC } from "react"; -import { type ModalControl } from "../../common/hooks"; -import { Link, useNavigate } from "react-router-dom"; -import { AppRoute } from "../../Routes"; - -interface Props { - control: ModalControl; -} -export const MangroveModal: FC = ({ control }) => { - const navigate = useNavigate(); - - const onOK = (): void => { - control.onModalOK(); - navigate(AppRoute.Lock); - }; - - return ( - } - ok={onOK} - > -
- Mangrove Reward -
-

- Sunrise is airdropping mangrove NFTs to users. Each mangrove NFT - represents 1 mangrove tree that will be planted by{" "} - - PanaSea - - . -

-

- Claim your Mangrove! -

-

To be eligible for a mangrove NFT:

-

-

    -
  • - - Lock - {" "} - at least 0.5 gSOL -
  • -
  • - Fill in a short form; the form will be displayed once you lock - your gSOL. -
  • -
-

-

Complete the steps before August 8th!

- -
-
-
- ); -}; diff --git a/packages/app/src/rewards/components/mangrove.png b/packages/app/src/rewards/components/mangrove.png deleted file mode 100644 index 186e5e8c..00000000 Binary files a/packages/app/src/rewards/components/mangrove.png and /dev/null differ diff --git a/yarn.lock b/yarn.lock index 5170c8e2..b8880f44 100644 --- a/yarn.lock +++ b/yarn.lock @@ -376,6 +376,16 @@ "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" +"@babel/plugin-proposal-private-property-in-object@^7.21.11": + version "7.21.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz#69d597086b6760c4126525cfa154f34631ff272c" + integrity sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-create-class-features-plugin" "^7.21.0" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e"