Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add stats page w/ datadog iframe #1224

Merged
merged 2 commits into from
Nov 8, 2024
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
32 changes: 32 additions & 0 deletions apps/web/app/(stats)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { Metadata } from 'next';

export const metadata: Metadata = {
metadataBase: new URL('https://base.org'),
title: `Base`,
description:
'Base is a secure, low-cost, builder-friendly Ethereum L2 built to bring the next billion users onchain.',
openGraph: {
type: 'website',
title: `Base`,
description:
'Base is a secure, low-cost, builder-friendly Ethereum L2 built to bring the next billion users onchain.',
url: `/`,
images: ['https://base.org/images/base-open-graph.png'],
},
twitter: {
site: '@base',
card: 'summary_large_image',
},
};

export default async function StatsLayout({
children, // will be a page or nested layout
}: {
children: React.ReactNode;
}) {
return (
<div className="h-screen w-screen">
{children}
</div>
);
}
18 changes: 18 additions & 0 deletions apps/web/app/(stats)/stats/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Metadata } from 'next';

export const metadata: Metadata = {
metadataBase: new URL('https://base.org'),
title: `Base | Stats`,
description: 'Live stats for the Base network',
};

export default async function Page() {
return (
<iframe
title="Base Stats"
src="https://p.datadoghq.com/sb/883862235-507cea11844d0f5a35054427f4de4c38"
width="100%"
height="100%"
/>
);
}
1 change: 1 addition & 0 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const contentSecurityPolicy = {
'https://unpkg.com/@lottiefiles/dotlottie-web@0.31.1/dist/dotlottie-player.wasm', // lottie player
`https://${process.env.NEXT_PUBLIC_PINATA_GATEWAY_URL}`,
],
'frame-src': ["https://p.datadoghq.com"],
'frame-ancestors': ["'self'", baseXYZDomains],
'form-action': ["'self'", baseXYZDomains],
'img-src': [
Expand Down
Loading