Skip to content

Commit

Permalink
Merge pull request #2 from ChangoMan/with-frame
Browse files Browse the repository at this point in the history
feat: Adding Farcaster Frame Buttons
  • Loading branch information
yashgo0018 authored May 24, 2024
2 parents e04eea2 + ad2420b commit 5e437a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ScaffoldEthAppWithProviders } from "~~/components/ScaffoldEthAppWithPro
import { ThemeProvider } from "~~/components/ThemeProvider";
import "~~/styles/globals.css";

const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
const baseUrl = process.env.VERCEL_PROJECT_PRODUCTION_URL
? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
: `http://localhost:${process.env.PORT || 3000}`;
const imageUrl = `${baseUrl}/thumbnail.jpg`;

Expand Down Expand Up @@ -44,6 +44,16 @@ export const metadata: Metadata = {
icons: {
icon: [{ url: "/favicon.png", sizes: "32x32", type: "image/png" }],
},
other: {
"fc:frame": "vNext",
"fc:frame:image": imageUrl,
"fc:frame:button:1": "Fork On GitHub",
"fc:frame:button:1:action": "link",
"fc:frame:button:1:target": "https://github.com/yashgo0018/maci-wrapper",
"fc:frame:button:2": "Start Voting!",
"fc:frame:button:2:action": "link",
"fc:frame:button:2:target": "https://zk-voting.com",
},
};

const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => {
Expand Down
Binary file modified packages/nextjs/public/thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5e437a8

Please sign in to comment.