Skip to content

Commit

Permalink
fix: hiding /earn page
Browse files Browse the repository at this point in the history
  • Loading branch information
k0beLeenders committed Oct 18, 2024
1 parent 2a350de commit 230f55a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions apps/marginfi-v2-ui/src/components/common/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Image from "next/image";
import { useRouter } from "next/router";

import { PublicKey } from "@solana/web3.js";
import LipAccount from "@mrgnlabs/lip-client/src/account";
// import LipAccount from "@mrgnlabs/lip-client/src/account";
import { IconBell, IconBrandTelegram } from "@tabler/icons-react";

import { collectRewardsBatch, capture, cn } from "@mrgnlabs/mrgn-utils";
Expand Down Expand Up @@ -60,7 +60,7 @@ export const Navbar: FC = () => {

const [userPointsData] = useUserProfileStore((state) => [state.userPointsData]);

const [lipAccount, setLipAccount] = useState<LipAccount | null>(null);
// const [lipAccount, setLipAccount] = useState<LipAccount | null>(null);

useEffect(() => {
if (!walletAddress && lendUserDataFetched) {
Expand All @@ -78,13 +78,13 @@ export const Navbar: FC = () => {
.filter((address) => address !== undefined) as PublicKey[];
}, [selectedAccount, extendedBankInfos]);

useEffect(() => {
(async function () {
if (!mfiClient || !lipClient || !walletAddress) return;
const lipAccount = await LipAccount.fetch(walletAddress, lipClient, mfiClient);
setLipAccount(lipAccount);
})();
}, [lipClient, mfiClient, walletAddress]);
// useEffect(() => {
// (async function () {
// if (!mfiClient || !lipClient || !walletAddress) return;
// const lipAccount = await LipAccount.fetch(walletAddress, lipClient, mfiClient);
// setLipAccount(lipAccount);
// })();
// }, [lipClient, mfiClient, walletAddress]);

return (
<header className="h-[64px] mb-4 md:mb-8 lg:mb-14">
Expand Down Expand Up @@ -135,7 +135,7 @@ export const Navbar: FC = () => {
portfolio
</Link>

{lipAccount && lipAccount.deposits.length > 0 && (
{/* {lipAccount && lipAccount.deposits.length > 0 && (
<Link
href={"/earn"}
className={
Expand All @@ -144,7 +144,7 @@ export const Navbar: FC = () => {
>
earn
</Link>
)}
)} */}

<Link
href="/ecosystem"
Expand Down

0 comments on commit 230f55a

Please sign in to comment.