refactored types from HistoryChart.tsx
This commit is contained in:
@@ -12,8 +12,8 @@ import {
|
||||
import LatestItemsList, { LatestItem } from "./components/LatestItemsList";
|
||||
import HistoryChart from "./components/HistoryChart";
|
||||
import {
|
||||
AggregatedDashboardData,
|
||||
} from "./components/HistoryChart";
|
||||
AggregatedDashboardData
|
||||
} from "./types/historyChart";
|
||||
|
||||
import {
|
||||
fetchLatestTransactions,
|
||||
@@ -85,6 +85,13 @@ export default function Dashboard() {
|
||||
}, []);
|
||||
|
||||
const currentData = aggregated[mode];
|
||||
if (!currentData) {
|
||||
return (
|
||||
<Box sx={{ display: "flex", justifyContent: "center", alignItems: "center", height: "60vh" }}>
|
||||
<CircularProgress />
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
const currentLatest = latest[mode];
|
||||
|
||||
// -------- UI STATES --------
|
||||
|
||||
Reference in New Issue
Block a user