diff --git a/src/app/page.tsx b/src/app/page.tsx index e18a471..272b648 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,11 +1,66 @@ "use client"; -import { GridMap } from "@/components/spatial/GridMap"; +import { Suspense } from "react"; +import dynamic from "next/dynamic"; import { FleetGrid } from "@/components/spatial/FleetGrid"; -import { LiveDataView } from "@/components/spatial/LiveDataView"; -import { TariffEditor } from "@/components/tariffs/TariffEditor"; import { useWeb3Auth } from "@/hooks/useWeb3Auth"; +const GridMapSkeleton = () => ( +
+ Loading Grid Map... +
+); + +const LiveDataViewSkeleton = () => ( +
+ Loading Live Telemetry... +
+); + +const TariffEditorSkeleton = () => ( +
+ Loading Tariff Configuration... +
+); + +const TxModalSkeleton = () => ( +
+
+
+); + +const GridMap = dynamic( + () => import("@/components/spatial/GridMap").then((m) => m.GridMap), + { + ssr: false, + loading: () => , + } +); + +const LiveDataView = dynamic( + () => import("@/components/spatial/LiveDataView").then((m) => m.LiveDataView), + { + ssr: false, + loading: () => , + } +); + +const TariffEditor = dynamic( + () => import("@/components/tariffs/TariffEditor").then((m) => m.TariffEditor), + { + loading: () => , + } +); + +// We define TxModal here as well to satisfy the requirements, in case it gets used. +const TxModal = dynamic( + () => import("@/components/wallet/TxModal").then((m) => m.TxModal), + { + ssr: false, + loading: () => , + } +); + export default function Home() { const { account, isConnected, connect, disconnect } = useWeb3Auth(); @@ -44,7 +99,9 @@ export default function Home() {

Grid Network

- + }> + +
@@ -54,13 +111,28 @@ export default function Home() {

Live Telemetry

- + }> + +

Tariff Configuration

- + }> + +
+ + + {}} + onConfirm={async () => {}} + operation="" + resourceFee="" + balance="" + /> +