Skip to content

Commit

Permalink
Merge pull request #1943 from IntersectMBO/fix/1934-drep-doesnt-show-…
Browse files Browse the repository at this point in the history
…up-in-list-after-registration

fix(#1934): make displaying own DRep in DRep directory available
  • Loading branch information
jdyczka authored Sep 5, 2024
2 parents 92e0868 + 232302f commit 729db77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ changes.

### Changed

-
- Make displaying own DRep in DRep directory available [Issue 1934](https://github.com/IntersectMBO/govtool/issues/1934)

### Removed

Expand Down
34 changes: 13 additions & 21 deletions govtool/frontend/src/pages/DRepDirectoryContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,27 +208,19 @@ export const DRepDirectoryContent: FC<DRepDirectoryContentProps> = ({
}}
>
{dRepList?.length === 0 && <EmptyStateDrepDirectory />}
{dRepListToDisplay?.map((dRep) => {
if (
isSameDRep(dRep, myDrep?.view) ||
isSameDRep(dRep, inProgressDelegation)
) {
return null;
}
return (
<Box key={dRep.drepId} component="li" sx={{ listStyle: "none" }}>
<DRepCard
dRep={dRep}
isConnected={!!isConnected}
isDelegationLoading={
isDelegating === dRep.view || isDelegating === dRep.drepId
}
isMe={isSameDRep(dRep, myDRepId)}
onDelegate={() => delegate(dRep.drepId)}
/>
</Box>
);
})}
{dRepListToDisplay?.map((dRep) => (
<Box key={dRep.drepId} component="li" sx={{ listStyle: "none" }}>
<DRepCard
dRep={dRep}
isConnected={!!isConnected}
isDelegationLoading={
isDelegating === dRep.view || isDelegating === dRep.drepId
}
isMe={isSameDRep(dRep, myDRepId)}
onDelegate={() => delegate(dRep.drepId)}
/>
</Box>
))}
</Box>
</>
{dRepListHasNextPage && dRepList.length >= 10 && (
Expand Down

0 comments on commit 729db77

Please sign in to comment.