Skip to content

Commit

Permalink
⬆️ upgrade next to canary (fixes rollapp bug)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredk3 committed Mar 23, 2024
1 parent c5da28f commit c15aa31
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 92 deletions.
42 changes: 0 additions & 42 deletions apps/web/app/(home)/[network]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,9 @@ interface Props {
}

export async function generateMetadata(props: Props): Promise<Metadata> {
console.log(
`==================[generateMetadata (/${props.params.network})]==================`,
);
const network = await getSingleNetwork(props.params.network);
console.dir(
{
network,
},
{ depth: null },
);
if (!network) notFound();

console.log({
title: `${capitalize(network.brand)}`,
description: `A block explorer for the ${capitalize(network.brand)} ecosystem.`,
openGraph: {
url: `/${network.slug}`,
type: "website",
images: [
{
url: `${env.NEXT_PUBLIC_PRODUCTION_URL}/api/og?model=network-home&networkSlug=${network.slug}`,
...OG_SIZE,
},
],
},
});

return {
title: `${capitalize(network.brand)}`,
description: `A block explorer for the ${capitalize(network.brand)} ecosystem.`,
Expand All @@ -62,27 +38,12 @@ export async function generateMetadata(props: Props): Promise<Metadata> {
}

export default async function NetworkWidgetPage({ params }: Props) {
console.log(
`==================[PAGE (/${params.network})]==================`,
);
const network = await getSingleNetwork(params.network);

console.dir(
{
network,
},
{ depth: null },
);
// this fixes a bug on vercel with build where it would throw if the network doesn't
// exist (even though technically it should always exist)
if (!network) notFound();

console.dir(
{
layout: network.config.widgetLayout,
},
{ depth: null },
);
switch (network.config.widgetLayout) {
case "SVM":
return (
Expand All @@ -106,9 +67,6 @@ export default async function NetworkWidgetPage({ params }: Props) {
}

export async function generateStaticParams() {
console.log(
`==================[generateStaticParams (/[network])]==================`,
);
const paidNetworks = await getAllPaidNetworks();
return paidNetworks.map((network) => ({ network: network.slug }));
}
Expand Down
7 changes: 0 additions & 7 deletions apps/web/lib/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,6 @@ async function getSingleNetworkFetch(slug: string) {
integration.config.widgetLayout = "Dymension";
integration.config.primaryColor = "29 13% 45%";
}

console.dir(
{
integration,
},
{ depth: null },
);
return integration;
} catch (error) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"dayjs": "^1.11.7",
"decimal.js": "^10.4.3",
"lucide-react": "^0.259.0",
"next": "^14.1.1-canary.53",
"next": "^14.2.0-canary.39",
"react": "^18.2.0",
"react-day-picker": "^8.10.0",
"react-dom": "^18.2.0",
Expand Down
88 changes: 46 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c15aa31

Please sign in to comment.