Skip to content

Commit

Permalink
Merge pull request #895 from IntersectMBO/fix/888-for-sole-voter-view…
Browse files Browse the repository at this point in the history
…-details-button-should-be-hidden

Fix/888 for sole voter view details button should be hidden
  • Loading branch information
Sworzen1 authored Apr 30, 2024
2 parents 7f81095 + 12ce0fb commit 8946639
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions govtool/frontend/src/components/organisms/DRepCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,22 @@ export const DRepCard = ({
},
}}
>
<Button
data-testid={`${view}-view-details-button`}
variant="outlined"
onClick={() =>
navigate(
(isConnected
? PATHS.dashboardDRepDirectoryDRep
: PATHS.dRepDirectoryDRep
).replace(":dRepId", view),
)
}
>
{t("viewDetails")}
</Button>
{type === "DRep" && (
<Button
data-testid={`${view}-view-details-button`}
variant="outlined"
onClick={() =>
navigate(
(isConnected
? PATHS.dashboardDRepDirectoryDRep
: PATHS.dRepDirectoryDRep
).replace(":dRepId", view),
)
}
>
{t("viewDetails")}
</Button>
)}
{status === "Active" &&
isConnected &&
onDelegate &&
Expand Down

0 comments on commit 8946639

Please sign in to comment.