Skip to content

Commit

Permalink
Fix NonFarmedAssets
Browse files Browse the repository at this point in the history
  • Loading branch information
lq0-github committed Jan 20, 2025
1 parent e0016e5 commit f56b60a
Showing 1 changed file with 38 additions and 17 deletions.
55 changes: 38 additions & 17 deletions components/NonFarmedAssets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,46 @@ function NonFarmedAssets() {
} = useNonFarmedAssets(true);
const main_null = !hasNonFarmedAssets || hasNegativeNetLiquidity;
const meme_null = !hasNonFarmedAssetsMEME || hasNegativeNetLiquidityMEME;
if (main_null && meme_null) return null;
return (
<div className="flex xsm:hidden xsm:gap-3 items-center justify-between mb-5 border border-primary border-opacity-60 bg-primary bg-opacity-5 rounded-xl p-3 pl-5">
<div className="flex items-start">
<WarnIcon className="relative top-px flex-shrink-0 xsm:hidden" />
<div className="text-sm text-white mx-2.5 xsm:mx-0">
At least one of your farms in the {main_null ? "meme" : "Mainstream"} has started emitting
extra rewards. If you are seeing this warning, please click ‘Claim & Join’ to join the new
farm.

if (!main_null) {
return (
<div className="flex xsm:hidden xsm:gap-3 items-center justify-between mb-5 border border-primary border-opacity-60 bg-primary bg-opacity-5 rounded-xl p-3 pl-5">
<div className="flex items-start">
<WarnIcon className="relative top-px flex-shrink-0 xsm:hidden" />
<div className="text-sm text-white mx-2.5 xsm:mx-0">
At least one of your farms in the Mainstream has started emitting extra rewards. If you
are seeing this warning, please click ‘Claim & Join’ to join the new farm.
</div>
</div>
<ClaimAllRewards
location="non-farmed-assets"
Button={ClaimButton}
disabled={hasNegativeNetLiquidity}
memeCategory={false}
/>
</div>
<ClaimAllRewards
location="non-farmed-assets"
Button={ClaimButton}
disabled={hasNegativeNetLiquidity}
memeCategory={main_null}
/>
</div>
);
);
} else if (meme_null) {
return (
<div className="flex xsm:hidden xsm:gap-3 items-center justify-between mb-5 border border-primary border-opacity-60 bg-primary bg-opacity-5 rounded-xl p-3 pl-5">
<div className="flex items-start">
<WarnIcon className="relative top-px flex-shrink-0 xsm:hidden" />
<div className="text-sm text-white mx-2.5 xsm:mx-0">
At least one of your farms in the meme has started emitting extra rewards. If you are
seeing this warning, please click ‘Claim & Join’ to join the new farm.
</div>
</div>
<ClaimAllRewards
location="non-farmed-assets"
Button={ClaimButton}
disabled={hasNegativeNetLiquidityMEME}
memeCategory={true}
/>
</div>
);
}

return null;
}

const ClaimButton = (props) => {
Expand Down

0 comments on commit f56b60a

Please sign in to comment.