Skip to content

Commit

Permalink
Revert "refactor: Disable Claim Rewards button (#16)" (#17)
Browse files Browse the repository at this point in the history
This reverts commit 405d1b4.
  • Loading branch information
sogipec authored Jan 21, 2025
1 parent b2dc775 commit 8717c32
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
23 changes: 11 additions & 12 deletions src/components/element/rewards/ClaimRewardsChainTableRow.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Tag from "@core/components/element/Tag";
import type { Reward } from "@merkl/api";
import { Button, type Component, Icon, Space, Value, mergeClass } from "dappkit";
import type { TransactionButtonProps } from "dappkit";
import { TransactionButton, type TransactionButtonProps } from "dappkit";
import { Collapsible } from "dappkit";
import { EventBlocker } from "dappkit";
import { useWalletContext } from "dappkit";
Expand Down Expand Up @@ -96,17 +96,16 @@ export default function ClaimRewardsChainTableRow({
<EventBlocker>
{isAbleToClaim &&
(isOnCorrectChain ? (
<></>
// <TransactionButton
// enableSponsorCheckbox
// name="Claim Rewards"
// disabled={!claimTransaction}
// className="ml-xl"
// look="hype"
// tx={claimTransaction}
// onSuccess={onClaimSuccess}>
// Claim
// </TransactionButton>
<TransactionButton
enableSponsorCheckbox
name="Claim Rewards"
disabled={!claimTransaction}
className="ml-xl"
look="hype"
tx={claimTransaction}
onSuccess={onClaimSuccess}>
Claim
</TransactionButton>
) : (
<Button className="ml-xl" onClick={() => switchChain(reward.chain.id)}>
Switch Network <Icon remix="RiArrowLeftRightLine" />
Expand Down
6 changes: 3 additions & 3 deletions src/modules/user/routes/user.$address.header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
import { Outlet, useFetcher, useLoaderData } from "@remix-run/react";
import { Button, Divider, Dropdown, Group, Hash, Icon, Text, Value } from "dappkit";
import type { TransactionButtonProps } from "dappkit";
import { TransactionButton, type TransactionButtonProps } from "dappkit";
import { useWalletContext } from "dappkit";
import { useMemo } from "react";
import { isAddress } from "viem";
Expand Down Expand Up @@ -151,7 +151,7 @@ export default function Index() {
</Text>
</Group>
<Group className="flex-col">
{/* {isAbleToClaim && (
{isAbleToClaim && (
<TransactionButton
name="Claim Rewards"
enableSponsorCheckbox
Expand All @@ -163,7 +163,7 @@ export default function Index() {
{isSingleChain ? "Claim Now" : `Claim on ${chain?.name}`}
<Icon remix="RiHandCoinFill" />
</TransactionButton>
)} */}
)}
</Group>
</Group>

Expand Down

0 comments on commit 8717c32

Please sign in to comment.