add loading placeholders
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { LoadingBlocks } from "@/components/Loading"
|
||||
import { withSubscribe } from "@/components/withSuspense"
|
||||
import { Route, Routes } from "react-router-dom"
|
||||
import { BlockTable } from "./BlockTable"
|
||||
@@ -5,20 +6,25 @@ import { BlockDetail } from "./Detail"
|
||||
import { Events } from "./Events"
|
||||
import { Summary } from "./Summary"
|
||||
|
||||
export const Explorer = withSubscribe(() => (
|
||||
<Routes>
|
||||
<Route path=":hash" element={<BlockDetail />} />
|
||||
<Route
|
||||
path="*"
|
||||
element={
|
||||
<div className="overflow-auto">
|
||||
<Summary />
|
||||
<div className="flex gap-2 items-start flex-wrap lg:flex-nowrap">
|
||||
<BlockTable />
|
||||
<Events />
|
||||
export const Explorer = withSubscribe(
|
||||
() => (
|
||||
<Routes>
|
||||
<Route path=":hash" element={<BlockDetail />} />
|
||||
<Route
|
||||
path="*"
|
||||
element={
|
||||
<div className="overflow-auto">
|
||||
<Summary />
|
||||
<div className="flex gap-2 items-start flex-wrap lg:flex-nowrap">
|
||||
<BlockTable />
|
||||
<Events />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</Routes>
|
||||
))
|
||||
}
|
||||
/>
|
||||
</Routes>
|
||||
),
|
||||
{
|
||||
fallback: <LoadingBlocks />,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user