Last active
May 8, 2024 23:04
-
-
Save rollendxavier/4539be92e878c21011b978be5feb10af to your computer and use it in GitHub Desktop.
Page code for Farcaster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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