Skip to content

Instantly share code, notes, and snippets.

@rollendxavier
Last active May 8, 2024 23:04
Show Gist options
  • Save rollendxavier/4539be92e878c21011b978be5feb10af to your computer and use it in GitHub Desktop.
Save rollendxavier/4539be92e878c21011b978be5feb10af to your computer and use it in GitHub Desktop.
Page code for Farcaster
import { getFrameMetadata } from '@coinbase/onchainkit';
import type { Metadata } from 'next';
import { NEXT_PUBLIC_URL } from './config';
const frameMetadata = getFrameMetadata({
buttons: [
{
label: 'Trending Crypto Pools',
},
{
action: 'link',
label: 'Visit Coingcko',
target: 'https://www.coingecko.com',
},
],
image: {
src: `${NEXT_PUBLIC_URL}/gecko_frame.JPG`,
aspectRatio: '1:1',
},
postUrl: `${NEXT_PUBLIC_URL}/api/trendingPools`,
});
export const metadata: Metadata = {
metadataBase: new URL(NEXT_PUBLIC_URL),
title: 'Crypto Farcaster Frames - Powered by CoinGecko',
description: 'LFG',
openGraph: {
title: 'Crypto Farcaster Frames - Powered by CoinGecko',
description: 'LFG',
images: [`${NEXT_PUBLIC_URL}/gecko_frame.JPG`],
},
other: {
...frameMetadata,
},
};
export default function Page() {
return (
<>
<h1>Welcome to Crypto Farcaster Frames - Powered by CoinGecko</h1>
</>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment