Skip to content

Commit 3a6d1a3

Browse files
committed
fix: fix merge conflict
1 parent 7f877ef commit 3a6d1a3

5 files changed

Lines changed: 6 additions & 81 deletions

File tree

components/HistoryView/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ const Index = () => {
7474
? ("out" as const)
7575
: ("in" as const),
7676
}));
77-
}, [
78-
data?.winningTicketRedeemedEvents,
79-
account,
80-
lastEventTimestamp,
81-
]);
77+
}, [data?.winningTicketRedeemedEvents, account, lastEventTimestamp]);
8278

8379
// performs filtering of winning ticket redeemed events and merges with separate "winning tickets"
8480
// this is so Os winning tickets show properly: https://github.com/livepeer/explorer/issues/108

components/PerformanceList/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Region } from "@lib/api/types/get-regions";
66
import { textTruncate } from "@lib/utils";
77
import { Badge, Box, Flex, Link as A, Skeleton } from "@livepeer/design-system";
88
import { QuestionMarkCircledIcon } from "@modulz/radix-icons";
9+
import { OrchestratorsQueryResult } from "apollo";
910
import { useAllScoreData, useEnsData } from "hooks";
1011
import Link from "next/link";
1112
import numbro from "numbro";
Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,8 @@
11
import AccountLayout from "@layouts/account";
22
import { getLayout } from "@layouts/main";
3-
import { getAccount, getGateways, getSortedOrchestrators } from "@lib/api/ssr";
4-
import { EnsIdentity } from "@lib/api/types/get-ens";
5-
import {
6-
AccountQueryResult,
7-
getApollo,
8-
OrchestratorsSortedQueryResult,
9-
} from "apollo";
103

11-
type PageProps = {
12-
account: AccountQueryResult["data"];
13-
sortedOrchestrators: OrchestratorsSortedQueryResult["data"];
14-
fallback: { [key: string]: EnsIdentity };
15-
};
16-
17-
const BroadcastingPage = ({ account, sortedOrchestrators }: PageProps) => {
18-
return (
19-
<AccountLayout
20-
sortedOrchestrators={sortedOrchestrators}
21-
account={account}
22-
/>
23-
);
24-
};
4+
const BroadcastingPage = () => <AccountLayout />;
255

266
BroadcastingPage.getLayout = getLayout;
277

28-
export const getStaticPaths = async () => {
29-
const { gateways } = await getGateways();
30-
31-
const paths =
32-
gateways?.data?.gateways?.map((g) => ({
33-
params: { account: g.id },
34-
})) ?? [];
35-
36-
return {
37-
paths,
38-
fallback: "blocking",
39-
};
40-
};
41-
42-
export const getStaticProps = async (context) => {
43-
try {
44-
const client = getApollo();
45-
const accountId = context.params?.account?.toString().toLowerCase();
46-
47-
if (!accountId) {
48-
return { notFound: true };
49-
}
50-
51-
const { account, fallback } = await getAccount(client, accountId);
52-
const { sortedOrchestrators, fallback: sortedOrchestratorsFallback } =
53-
await getSortedOrchestrators(client);
54-
55-
if (!account.data?.gateway || !sortedOrchestrators.data) {
56-
return { notFound: true, revalidate: 300 };
57-
}
58-
59-
const props: PageProps = {
60-
account: account.data,
61-
sortedOrchestrators: sortedOrchestrators.data,
62-
fallback: {
63-
...sortedOrchestratorsFallback,
64-
...fallback,
65-
},
66-
};
67-
68-
return {
69-
props,
70-
revalidate: 600,
71-
};
72-
} catch (e) {
73-
console.error(e);
74-
}
75-
76-
return {
77-
notFound: true,
78-
};
79-
};
80-
818
export default BroadcastingPage;

pages/gateways.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import GatewayList from "@components/GatewayList";
2-
import { getLayout, LAYOUT_MAX_WIDTH } from "@layouts/main";
2+
import { getLayout } from "@layouts/main";
33
import { getGateways } from "@lib/api/ssr";
44
import { Box, Container, Flex, Heading } from "@livepeer/design-system";
55
import { GatewaysQueryResult, getApollo } from "apollo";
@@ -15,7 +15,7 @@ const GatewaysPage = ({ gateways }: PageProps) => {
1515
<Head>
1616
<title>Livepeer Explorer - Gateways</title>
1717
</Head>
18-
<Container css={{ maxWidth: LAYOUT_MAX_WIDTH, width: "100%" }}>
18+
<Container css={{ maxWidth: "", width: "100%" }}>
1919
<Flex
2020
css={{
2121
flexDirection: "column",

pages/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ export const getStaticProps = async () => {
540540
const errorProps: PageProps = {
541541
hadError: true,
542542
orchestrators: null,
543+
gateways: null,
543544
events: null,
544545
protocol: null,
545546
fallback: {},

0 commit comments

Comments
 (0)