Skip to content

Commit

Permalink
Remove mangrove campaign (now complete)
Browse files Browse the repository at this point in the history
  • Loading branch information
dankelleher committed Sep 18, 2023
1 parent c457077 commit 464ee8c
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 284 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ExclamationTriangleIcon } from "@heroicons/react/24/solid";
import React, { type FC } from "react";

import { BaseModal, type ModalProps } from "./";
import { MangroveButton } from "../../../rewards/components/MangroveButton";

const LockWarningModal: FC<ModalProps> = (props) => {
return (
Expand All @@ -28,10 +27,6 @@ const LockWarningModal: FC<ModalProps> = (props) => {
Locked gSOL will be available to unlock after one full epoch (2-3
days).
</p>
<MangroveButton />
<p className="text-md">
To earn a bonus Mangrove NFT, you must lock at least 0.5 gSOL.
</p>
</div>
</div>
</div>
Expand Down
18 changes: 0 additions & 18 deletions packages/app/src/hub/HubApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { useHelp } from "../common/context/HelpContext";
import { AppRoute } from "../Routes";
import { AlertBadge } from "../common/content/Badge";
import { useLockHubDetails } from "./hooks/useLockHubDetails";
import { MangroveIcon } from "../rewards/components/MangroveIcon";

const LINK_CHEVRON_SIZE = 32;

Expand All @@ -42,7 +41,6 @@ const _HubApp: ForwardRefRenderFunction<
const [showIntro, updateShowIntro] = useState(false);
const [introLeft, updateIntroLeft] = useState(false);
const [showHubNav, updateShowHubNav] = useState(false);
const [showAlerts, updateShowAlerts] = useState(false);

const wasHubNavShown = useRef(false);
const showWalletButton = useMemo(() => {
Expand Down Expand Up @@ -123,21 +121,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 (
<div
className={clx(
Expand Down Expand Up @@ -267,7 +250,6 @@ const _HubApp: ForwardRefRenderFunction<
<div className="relative inline-block">
<span className="text-2xl">Lock</span>
{showLockAlert && <AlertBadge />}
{showAlerts && <MangroveIcon />}
</div>
<br />
<IoChevronDownOutline
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/hub/components/HubIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { WalletMultiButton } from "@solana/wallet-adapter-react-ui";
import { type FC } from "react";

import { CarbonRecovered, LogoIcon, LogoText } from "../../common/components";
import { MangroveButton } from "../../rewards/components/MangroveButton";

const HubIntro: FC<{
show: boolean;
Expand Down Expand Up @@ -86,9 +85,6 @@ const HubIntro: FC<{
<WalletMultiButton className="!bg-green hover:!bg-green-light !text-white">
Start reducing CO<sub>2</sub>&nbsp;emissions
</WalletMultiButton>
<div className="mt-6">
<MangroveButton />
</div>
<CarbonRecovered />
</Transition.Child>
</Transition>
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/locking/LockingApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -187,9 +186,6 @@ const _LockingApp: ForwardRefRenderFunction<
<h1 className="font-bold text-green-light text-3xl text-center">
Lock gSOL to receive an Impact NFT
</h1>
<div className={"flex flex-col items-center mt-4"}>
<MangroveButton />
</div>
</div>
)}
{details?.impactNFTDetails && (
Expand Down
8 changes: 0 additions & 8 deletions packages/app/src/locking/LockingSuccessModal.tsx
Original file line number Diff line number Diff line change
@@ -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 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 (
<InfoModal title="Well done!" modalControl={control} showActions={false}>
{eligibleForReward && <MangroveFormButton />}
<LockTweetButton />
</InfoModal>
);
Expand Down
21 changes: 0 additions & 21 deletions packages/app/src/rewards/components/MangroveButton.tsx

This file was deleted.

87 changes: 0 additions & 87 deletions packages/app/src/rewards/components/MangroveDetails.tsx

This file was deleted.

41 changes: 0 additions & 41 deletions packages/app/src/rewards/components/MangroveFormButton.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions packages/app/src/rewards/components/MangroveIcon.tsx

This file was deleted.

75 changes: 0 additions & 75 deletions packages/app/src/rewards/components/MangroveModal.tsx

This file was deleted.

Binary file removed packages/app/src/rewards/components/mangrove.png
Binary file not shown.

0 comments on commit 464ee8c

Please sign in to comment.