Skip to content

Commit

Permalink
Merge pull request #670 from IntersectMBO/fix/641-dashboard-sole-volt…
Browse files Browse the repository at this point in the history
…er-card

fix/641-dashboard-sole-volter-card
  • Loading branch information
Sworzen1 authored Apr 8, 2024
2 parents e813b7b + 7afb1d7 commit a2487d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export const DashboardCards = () => {
/>

<SoleVoterDashboardCard
dRepIDBech32={dRepIDBech32}
pendingTransaction={pendingTransaction}
voter={voter}
votingPower={votingPower}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
import { useNavigate } from "react-router-dom";
import { Trans } from "react-i18next";

import { LoadingButtonProps } from "@atoms";
import { IMAGES, PATHS } from "@consts";
import { PendingTransaction } from "@context";
import { useTranslation } from "@hooks";
import {
DashboardActionCard,
DashboardActionCardProps,
SoleVoterAction,
} from "@molecules";
import { correctAdaFormat, openInNewTab } from "@utils";
import { LoadingButtonProps } from "@atoms";
import { VoterInfo } from "@models";
import { DashboardActionCard, DashboardActionCardProps } from "@molecules";
import { correctAdaFormat, openInNewTab } from "@utils";

type SoleVoterDashboardCardProps = {
dRepIDBech32: string;
pendingTransaction: PendingTransaction;
voter: VoterInfo;
votingPower: number;
};

export const SoleVoterDashboardCard = ({
dRepIDBech32,
pendingTransaction,
voter,
votingPower,
Expand All @@ -31,9 +25,6 @@ export const SoleVoterDashboardCard = ({

const ada = correctAdaFormat(votingPower);

// TODO: Add navigation to DRep explorer
const onClickAction = () => navigate("/");

// learn more button
const learnMoreButton: LoadingButtonProps = {
children: t("learnMore"),
Expand Down Expand Up @@ -140,15 +131,6 @@ export const SoleVoterDashboardCard = ({
pendingTransaction?.registerAsSoleVoter?.transactionHash ||
pendingTransaction?.retireAsSoleVoter?.transactionHash
}
>
{(pendingTransaction?.registerAsSoleVoter ||
voter.isRegisteredAsSoleVoter) && (
<SoleVoterAction
dRepId={dRepIDBech32}
onClickArrow={onClickAction}
sx={{ mt: 1.5 }}
/>
)}
</DashboardActionCard>
/>
);
};

0 comments on commit a2487d1

Please sign in to comment.