Skip to content

Commit

Permalink
Refactor button component in CollatorJoin and CollatorManagement
Browse files Browse the repository at this point in the history
  • Loading branch information
snoopy1412 committed Sep 12, 2024
1 parent 039f180 commit e52be45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
8 changes: 1 addition & 7 deletions src/components/collator/join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,7 @@ const CollatorJoin = ({ hasSessionKey, sessionKey, hasPool, refetch }: CollatorJ
showArrow
>
<div>
<Button
color="primary"
className="h-[2.125rem] w-full"
isDisabled={!hasSessionKey || !commissionValue || commission < 0n}
onClick={handleSetCommission}
isLoading={isSetCommissionLoading || isLockPeriodLoading}
>
<Button color="primary" className="h-[2.125rem] w-full" isDisabled>
{hasPool ? 'Collate' : 'Create Nomination Pool & Collate'}
</Button>
</div>
Expand Down
16 changes: 3 additions & 13 deletions src/components/collator/manage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,7 @@ const CollatorManagement = ({
showArrow
>
<div>
<Button
color="primary"
className="h-[2.125rem] w-full"
isDisabled
isLoading={
isPendingUpdateCommission ||
isLockPeriodLoading ||
isLoadingCollatorByAddress ||
isLoadingPrev ||
isRefetchingPrev
}
>
<Button color="primary" className="h-[2.125rem] w-full" isDisabled>
Update Commission
</Button>
</div>
Expand All @@ -263,7 +252,8 @@ const CollatorManagement = ({
isLockPeriodLoading ||
isLoadingUpdateCommission ||
isLoadingPrev ||
isRefetchingPrev
isRefetchingPrev ||
isLoadingCollatorByAddress
}
>
Update Commission
Expand Down

0 comments on commit e52be45

Please sign in to comment.