+ {/* My delegation */}
+ {myDrep && (
+
+
+
+
+
+
+ )}
+
+ {/* Automated voting options */}
+ {isConnected && (
+
+
+ {t("dRepDirectory.delegationOptions")}
+
+
+
+ )}
+
+ {/* DRep list */}
+
+
+ {t('dRepDirectory.listTitle')}
+
+
+
+ {dRepList?.length === 0 && (
+
+ {t('dRepDirectory.noResultsForTheSearchTitle')}
+ {t('dRepDirectory.noResultsForTheSearchDescription')}
+
+ )}
+ {dRepList?.map((dRep) =>
+ (isSameDRep(dRep, myDrep?.view) ? null : (
+
+ delegate(dRep.drepId)}
+ />
+
+ )),
+ )}
+
+
+
+ );
+};
diff --git a/govtool/frontend/src/pages/Dashboard.tsx b/govtool/frontend/src/pages/Dashboard.tsx
index 80c9797b1..818165757 100644
--- a/govtool/frontend/src/pages/Dashboard.tsx
+++ b/govtool/frontend/src/pages/Dashboard.tsx
@@ -3,7 +3,7 @@ import { useLocation, Outlet, useNavigate } from "react-router-dom";
import { Box } from "@mui/material";
import { Background, ScrollToManage } from "@atoms";
-import { PATHS } from "@consts";
+import { CONNECTED_NAV_ITEMS, PATHS } from "@consts";
import { useCardano } from "@context";
import { useScreenDimension, useTranslation } from "@hooks";
import { DashboardTopNav, Drawer, Footer } from "@organisms";
@@ -18,13 +18,11 @@ export const Dashboard = () => {
const { t } = useTranslation();
const getPageTitle = (path: string) => {
- if (path === PATHS.dashboard) {
- return t("dashboard.title");
- }
- if (path.includes(PATHS.dashboardGovernanceActions)) {
- return t("govActions.title");
- }
- return "";
+ if (path === PATHS.dashboard) return t("dashboard.title");
+ return (
+ Object.values(CONNECTED_NAV_ITEMS).find(({ navTo }) => pathname.startsWith(navTo))
+ ?.label ?? ""
+ );
};
useEffect(() => {
diff --git a/govtool/frontend/src/pages/index.ts b/govtool/frontend/src/pages/index.ts
index d1878f196..2507933ef 100644
--- a/govtool/frontend/src/pages/index.ts
+++ b/govtool/frontend/src/pages/index.ts
@@ -1,14 +1,19 @@
export * from "./ChooseStakeKey";
export * from "./CreateGovernanceAction";
+export * from "./DRepDetails";
+export * from "./DRepDirectory";
+export * from "./DRepDirectoryContent";
export * from "./Dashboard";
export * from "./DashboardGovernanceActionsCategory";
export * from "./DelegateTodRep";
+export * from "./DRepDirectory";
export * from "./EditDRepMetadata";
export * from "./ErrorPage";
export * from "./GovernanceActionDetails";
export * from "./GovernanceActions";
export * from "./GovernanceActionsCategory";
export * from "./Home";
+export * from "./RegisterAsSoleVoter";
export * from "./RegisterAsdRep";
export * from "./RegisterAsSoleVoter";
export * from "./RetireAsDrep";
diff --git a/govtool/frontend/src/services/requests/getDRepList.ts b/govtool/frontend/src/services/requests/getDRepList.ts
index 39ab28ecb..c4c0af028 100644
--- a/govtool/frontend/src/services/requests/getDRepList.ts
+++ b/govtool/frontend/src/services/requests/getDRepList.ts
@@ -1,7 +1,13 @@
import type { DRepData } from "@models";
import { API } from "../API";
-export const getDRepList = async () => {
- const response = await API.get