major refactor of the dashboard and react-openapi integration #1
@@ -9,11 +9,8 @@ import {
|
|||||||
ToggleButtonGroup
|
ToggleButtonGroup
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
|
||||||
import LatestItemsList, { LatestItem } from "./components/LatestItemsList";
|
import LatestItemsList, { LatestItem } from "./components/LatestItems";
|
||||||
import HistoryChart from "./components/HistoryChart";
|
import HistoryChart, { AggregatedDashboardData } from "./components/HistoryChart";
|
||||||
import {
|
|
||||||
AggregatedDashboardData
|
|
||||||
} from "./components/HistoryChart";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fetchLatestTransactions,
|
fetchLatestTransactions,
|
||||||
|
|||||||
18
src/components/LatestItems/LatestItems.models.ts
Normal file
18
src/components/LatestItems/LatestItems.models.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import * as React from "react";
|
||||||
|
|
||||||
|
export interface LatestItem {
|
||||||
|
id: string | number;
|
||||||
|
icon: React.ReactNode;
|
||||||
|
iconBgColor?: string;
|
||||||
|
title: string;
|
||||||
|
subtitle: string;
|
||||||
|
amount: string;
|
||||||
|
timeAgo: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LatestItemsListProps {
|
||||||
|
title?: string;
|
||||||
|
items: LatestItem[];
|
||||||
|
onViewAll?: () => void;
|
||||||
|
accentColor: string;
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@ export interface LatestItemsListProps {
|
|||||||
accentColor: any;
|
accentColor: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function LatestItemsList({
|
export default function LatestItems({
|
||||||
title = "Recent Transactions",
|
title = "Recent Transactions",
|
||||||
items,
|
items,
|
||||||
onViewAll,
|
onViewAll,
|
||||||
6
src/components/LatestItems/LatestItems.view.tsx
Normal file
6
src/components/LatestItems/LatestItems.view.tsx
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import LatestItemsListView from "./LatestItems.view";
|
||||||
|
import { LatestItemsListProps } from "./LatestItems.models";
|
||||||
|
|
||||||
|
export default function LatestItemsList(props: LatestItemsListProps) {
|
||||||
|
return <LatestItemsListView {...props} />;
|
||||||
|
}
|
||||||
2
src/components/LatestItems/index.ts
Normal file
2
src/components/LatestItems/index.ts
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export { default } from "./LatestItems";
|
||||||
|
export * from "./LatestItems.models";
|
||||||
Reference in New Issue
Block a user