Skip to content

Commit

Permalink
fix(pool): disable if no vouchers
Browse files Browse the repository at this point in the history
  • Loading branch information
williamluke4 committed Sep 24, 2024
1 parent 3f0b680 commit 35045d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/pools/forms/donate-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ export const DonateToPoolButton = (props: DonateToPoolProps) => {
return (
<ResponsiveModal
button={
<Button variant={"outline"} className="mx-auto">
<Button
variant={"outline"}
className="mx-auto"
disabled={Number(props.pool.tokenIndex.entryCount) === 0}
>
<SproutIcon className="size-5 mr-2" /> Seed/Donate
</Button>
}
Expand Down
4 changes: 3 additions & 1 deletion src/pages/pools/[address].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ export default function PoolPage(
<ResponsiveModal
title="Swap"
button={
<Button>
<Button
disabled={Number(pool?.tokenIndex.entryCount) === 0}
>
<RefreshCcw className="mr-2 h-5 w-5" />
Swap
</Button>
Expand Down

0 comments on commit 35045d8

Please sign in to comment.