Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding real owners count #41

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>;
}