Skip to content
Merged
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
7 changes: 7 additions & 0 deletions packages/nextjs/app/blockexplorer/address/[address]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from "fs";
import type { Metadata } from "next";
import path from "path";
import { Address } from "viem";
import { hardhat } from "viem/chains";
Expand All @@ -7,6 +8,12 @@ import deployedContracts from "~~/contracts/deployedContracts";
import { isZeroAddress } from "~~/utils/scaffold-eth/common";
import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";

export const metadata: Metadata = {
robots: { index: false, follow: false },
title: "Block Explorer — Address",
description: "Local-only block explorer address details",
};

type PageProps = {
params: Promise<{ address: Address }>;
};
Expand Down
12 changes: 8 additions & 4 deletions packages/nextjs/app/blockexplorer/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import type { Metadata } from "next";
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata";

export const metadata = getMetadata({
title: "BugChan",
description: "Block Explorer created with 🏗 Scaffold-ETH 2",
});
export const metadata: Metadata = {
...getMetadata({
title: "Block Explorer",
description: "Local-only block explorer utilities",
}),
robots: { index: false, follow: false },
};

const BlockExplorerLayout = ({ children }: { children: React.ReactNode }) => {
return <>{children}</>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import TransactionComp from "../_components/TransactionComp";
import type { NextPage } from "next";
import type { Metadata, NextPage } from "next";
import { Hash } from "viem";
import { isZeroAddress } from "~~/utils/scaffold-eth/common";

export const metadata: Metadata = {
robots: { index: false, follow: false },
title: "Block Explorer — Transaction",
description: "Local-only block explorer transaction details",
};

type PageProps = {
params: Promise<{ txHash?: Hash }>;
};
Expand Down
13 changes: 8 additions & 5 deletions packages/nextjs/app/debug/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { DebugContracts } from "./_components/DebugContracts";
import type { NextPage } from "next";
import type { Metadata, NextPage } from "next";
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata";

export const metadata = getMetadata({
title: "Debug Contracts",
description: "Debug your deployed 🏗 Scaffold-ETH 2 contracts in an easy way",
});
export const metadata: Metadata = {
...getMetadata({
title: "Debug Contracts",
description: "Debug your deployed 🏗 Scaffold-ETH 2 contracts in an easy way",
}),
robots: { index: false, follow: false },
};

const Debug: NextPage = () => {
return (
Expand Down
17 changes: 17 additions & 0 deletions packages/nextjs/app/head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default function Head() {
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://bugchan.xyz";
const orgJsonLd = {
"@context": "https://schema.org",
"@type": "Organization",
name: "BugChan",
url: siteUrl,
logo: `${siteUrl}/logo.svg`,
sameAs: ["https://x.com", "https://github.com", "https://linkedin.com"],
};

return (
<>
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(orgJsonLd) }} />
</>
);
}
5 changes: 5 additions & 0 deletions packages/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Roboto } from "next/font/google";
import localFont from "next/font/local";
import { GoogleAnalytics } from "@next/third-parties/google";
import "@rainbow-me/rainbowkit/styles.css";
import type { Viewport } from "next";
import { ScaffoldEthAppWithProviders } from "~~/components/ScaffoldEthAppWithProviders";
import { ThemeProvider } from "~~/components/ThemeProvider";
import "~~/styles/globals.css";
Expand All @@ -15,6 +16,10 @@ export const metadata = {
}),
};

export const viewport: Viewport = {
themeColor: "#0B0B0B",
};

const akiraExpanded = localFont({
src: [{ path: "../public/fonts/AkiraExpanded.otf", weight: "800" }],
variable: "--font-akira",
Expand Down
12 changes: 12 additions & 0 deletions packages/nextjs/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { MetadataRoute } from "next";

const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://bugchan.xyz";

export default function sitemap(): MetadataRoute.Sitemap {
const now = new Date();
const routes: MetadataRoute.Sitemap = ["", "/bounties", "/bounties/create", "/leaderboard", "/reports", "/about"].map(
path => ({ url: `${siteUrl}${path}`, lastModified: now, changeFrequency: "daily", priority: path ? 0.8 : 1 }),
);

return routes;
}
2 changes: 1 addition & 1 deletion packages/nextjs/public/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Disallow: /blockexplorer
Allow: /

Sitemap: https://bugchan.xyz/sitemap.xml
Host: https://bugchan.xyz
Host: bugchan.xyz
18 changes: 0 additions & 18 deletions packages/nextjs/public/sitemap.xml

This file was deleted.