Skip to content

Commit

Permalink
Adding real owners count (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypalacios authored Sep 1, 2023
1 parent c65ea09 commit e0424cf
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
14 changes: 12 additions & 2 deletions src/components/layout/Navigation/NavLink.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
BuildSharp as IconTxBuilder,
BuildSharp as IconSettings,
HomeRounded,
Layers as IconTxBuilder,
SvgIconComponent,
} from "@mui/icons-material";

Expand All @@ -18,6 +19,7 @@ export type NavLink = {
const icons = {
HomeRounded,
IconTxBuilder,
IconSettings,
};

export const MENU_ITEMS: NavLink[] = [
Expand All @@ -30,11 +32,19 @@ export const MENU_ITEMS: NavLink[] = [
target: true,
},
{
id: "docs",
id: "tx-builder",
title: "Tx Builder",
type: "item",
url: ROUTES.TxBuilder,
icon: icons.IconTxBuilder,
target: true,
},
{
id: "settings",
title: "Settings",
type: "item",
url: ROUTES.Settings,
icon: icons.IconSettings,
target: true,
},
];
1 change: 1 addition & 0 deletions src/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const ROUTES = {
Connect: "/connect",
App: "/app",
TxBuilder: "/app/transaction-builder",
Settings: "/app/settings",
} as const;

export type RouteValue = (typeof ROUTES)[keyof typeof ROUTES];
Expand Down
10 changes: 9 additions & 1 deletion src/pages/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Grid, Typography } from "@mui/material";
import Link from "next/link";

import { AddressBookWidget } from "@/components/AddressBookWidget";
import { SummaryCard } from "@/components/SummaryCard";
import { XsignerBalanceText } from "@/components/SummaryCard/XsignerBalanceText";
import { TransactionQueueWidget } from "@/components/TransactionQueueWidget";
import { ROUTES } from "@/config/routes";
import { useGetBalance } from "@/hooks/useGetBalance";
import { useGetXsignerSelected } from "@/hooks/xsignerSelected/useGetXsignerSelected";

Expand Down Expand Up @@ -34,7 +36,13 @@ export default function AppDashboard() {
<SummaryCard captionTitle="Tracked NFTs" caption="3" />
</Grid>
<Grid item xs={12} sm={6} md={3}>
<SummaryCard captionTitle="Owners" caption="0" />
<Link href={ROUTES.Settings}>
<SummaryCard
captionTitle="Owners"
caption={xSignerSelected?.owners.length.toString()}
isLoading={xSignerSelected ? false : true}
/>
</Link>
</Grid>
</Grid>
<Grid
Expand Down
3 changes: 3 additions & 0 deletions src/pages/app/settings.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function SettingsPage() {
return <h1>Settings</h1>;
}

0 comments on commit e0424cf

Please sign in to comment.