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

feat: ethdenver page #115

Open
wants to merge 1 commit into
base: main-production
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions app/2024/head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import PlausibleScript from '@root/components/PlausibleScript';

import DefaultMetaTags from '@components/DefaultMetaTags';

export default async function Head({ params }) {
return (
<>
<DefaultMetaTags />
<PlausibleScript />
</>
);
}
7 changes: 7 additions & 0 deletions app/2024/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
83 changes: 83 additions & 0 deletions app/2024/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import '@root/global.scss';

import { headers } from 'next/headers';
import FooterTiny from '@root/components/FooterTiny';
import Hero from '@root/components/Hero';
import ResponsiveNavbar from '@root/components/ResponsiveNavbar';
import SectionEventPage from '@root/components/SectionEventPage';
import {
FILECOIN_DEV_SUMMIT_2023_HERO_CONTENT,
FILECOIN_DEV_SUMMIT_2023_PAGE_CONTENT,
FILECOIN_DEV_SUMMIT_NAVIGATION_CONTENT,
FILECOIN_DEV_SUMMIT_PAGE_STYLE_CONTENT,
FOOTER_FILECOIN_DEV_SUMMIT_CONTENT,
} from '@root/content/filecoin-dev-summit';
import { makeRequest } from '@root/common/utilities';

export async function generateMetadata({ params, searchParams }) {
const title = 'FIL Dev Summit 2023: Singapore and Iceland';
const description =
'FIL Dev Summit is a gathering of developers, builders, and engaged community members who want to contribute to the core protocol and network evolution of Filecoin (think IPFS Thing, but bigger!).';
const url = 'https://fildev.io';

return {
title,
description,
url,
openGraph: {
title,
description,
url,
// SUMMARY_LARGE_IMAGE: 1500x785
images: ['https://i.ibb.co/XXgFfk0/twitter.png'],
},
twitter: {
title,
description,
url,
handle: '@filecoin',
cardType: 'summary_large_image',
},
};
}

export default async function Page(props) {
const blocks = FILECOIN_DEV_SUMMIT_2023_PAGE_CONTENT;
const footerContent = FOOTER_FILECOIN_DEV_SUMMIT_CONTENT;
const hero = FILECOIN_DEV_SUMMIT_2023_HERO_CONTENT;
const navContent = FILECOIN_DEV_SUMMIT_NAVIGATION_CONTENT;
const pageStyle = FILECOIN_DEV_SUMMIT_PAGE_STYLE_CONTENT;
const currentHeaders = headers();
const host = currentHeaders.get('host');

const promises = blocks.flatMap((contentItem) =>
contentItem.block.map(async (blockItem) => {
if ('scheduleData' in blockItem && blockItem.scheduleData.airtable) {
try {
const airtableEndpoint = blockItem.scheduleData.airtable.endPoint;
const data = await makeRequest({ endpoint: airtableEndpoint, host });

blockItem.scheduleData.airtable.data = data;
} catch (error) {
console.error('Error fetching tableData for blockItem:', blockItem, error);
}
}
})
);

await Promise.all(promises);

return (
<div style={{ background: pageStyle.backgroundColor, color: pageStyle.textColor }}>
<ResponsiveNavbar navContent={navContent} />

<div style={{ paddingBottom: '4rem' }}>
<Hero {...hero} />
</div>

<SectionEventPage blocks={blocks} pageStyle={pageStyle} />

<FooterTiny {...footerContent} />
</div>
);
}
Loading