Skip to content
Draft
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
11 changes: 11 additions & 0 deletions layouts/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@ const DesignSystemProviderTyped = DesignSystemProvider as React.FC<{

const ConnectButton = dynamic(() => import("../components/ConnectButton"), {
ssr: false,
loading: () => (
<Skeleton
css={{
height: "40px",
minWidth: "145px",
width: "145px",
borderRadius: "8px",
display: "inline-block",
}}
/>
),
});

const Claim = dynamic(() => import("../components/Claim"), { ssr: false });
Expand Down
37 changes: 6 additions & 31 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type { Group } from "@components/ExplorerChart";
import ExplorerChart from "@components/ExplorerChart";
import OrchestratorList from "@components/OrchestratorList";
import RoundStatus from "@components/RoundStatus";
import Spinner from "@components/Spinner";
import TransactionsList, {
FILTERED_EVENT_TYPENAMES,
} from "@components/TransactionsList";
Expand All @@ -23,7 +22,7 @@ import {
import { ArrowRightIcon } from "@modulz/radix-icons";
import { useChartData } from "hooks";
import Link from "next/link";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useCallback, useMemo, useState } from "react";

import {
EventsQueryResult,
Expand Down Expand Up @@ -255,14 +254,6 @@ type PageProps = {
};

const Home = ({ hadError, orchestrators, events, protocol }: PageProps) => {
const [showOrchList, setShowOrchList] = useState(false);

useEffect(() => {
// Let the browser paint the new route first
const id = requestAnimationFrame(() => setShowOrchList(true));
return () => cancelAnimationFrame(id);
}, []);

const allEvents = useMemo(
() =>
events?.transactions
Expand Down Expand Up @@ -448,27 +439,11 @@ const Home = ({ hadError, orchestrators, events, protocol }: PageProps) => {
</Flex>
</Flex>

{!orchestrators?.transcoders || !protocol?.protocol ? (
<Flex align="center" justify="center">
<Spinner />
</Flex>
) : (
<Box>
{showOrchList ? (
<OrchestratorList
data={orchestrators?.transcoders}
pageSize={10}
protocolData={protocol?.protocol}
/>
) : (
<Box
css={{ padding: "$4", textAlign: "center", opacity: 0.6 }}
>
Loading orchestrators…
</Box>
)}
</Box>
)}
<OrchestratorList
data={orchestrators?.transcoders}
pageSize={10}
protocolData={protocol?.protocol}
/>

<Flex
css={{
Expand Down
Loading