Skip to content

Commit

Permalink
Merge pull request #5 from BuidlMasons/IPFS-update
Browse files Browse the repository at this point in the history
Ipfs & redirect link update
  • Loading branch information
Astronaut828 authored Feb 7, 2024
2 parents 122d43c + d5d0492 commit ff71f54
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
2 changes: 0 additions & 2 deletions packages/nextjs/.env.example

This file was deleted.

6 changes: 3 additions & 3 deletions packages/nextjs/app/api/end/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export async function POST(req: NextRequest): Promise<Response> {

let path: string;
if (buttonId === 1) {
path = "cosmiccowboys";
path = "speedrunEthereum";
} else if (buttonId === 2) {
path = "pinatacloud";
path = "buidlGuidl";
} else if (buttonId === 3) {
path = "video";
path = "bgGeneralChat";
} else {
path = "";
}
Expand Down
10 changes: 5 additions & 5 deletions packages/nextjs/app/api/frame/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ async function getResponse(req: NextRequest): Promise<NextResponse> {
return new NextResponse(`<!DOCTYPE html><html><head>
<title>This is frame 7</title>
<meta property="fc:frame" content="vNext" />
<meta property="fc:frame:image" content="${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/Qme4FXhoxHHfyzTfRxSpASbMF8kajLEPkRQWhwWu9pkUjm/7.png" />
<meta property="fc:frame:button:1" content="Cosmic Cowboys" />
<meta property="fc:frame:image" content="${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/bafybeieshch2n347ttuuuyfkkemydwg7sxfsaemalrp3f5bujt4p3fxrei/7.png" />
<meta property="fc:frame:button:1" content="Speed Run Ethereum" />
<meta property="fc:frame:button:1:action" content="post_redirect" />
<meta property="fc:frame:button:2" content="Blog post Tutorial" />
<meta property="fc:frame:button:2" content="Buidl Guidl" />
<meta property="fc:frame:button:2:action" content="post_redirect" />
<meta property="fc:frame:button:3" content="Video Tutorial" />
<meta property="fc:frame:button:3" content="Meet other builders" />
<meta property="fc:frame:button:3:action" content="post_redirect" />
<meta property="fc:frame:post_url" content="${process.env.NEXT_PUBLIC_BASE_URL}/api/end" />
</head></html>`);
} else {
return new NextResponse(`<!DOCTYPE html><html><head>
<title>This is frame ${id}</title>
<meta property="fc:frame" content="vNext" />
<meta property="fc:frame:image" content="${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/Qme4FXhoxHHfyzTfRxSpASbMF8kajLEPkRQWhwWu9pkUjm/${id}.png" />
<meta property="fc:frame:image" content="${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/bafybeieshch2n347ttuuuyfkkemydwg7sxfsaemalrp3f5bujt4p3fxrei/${id}.png" />
<meta property="fc:frame:button:1" content="Next Page" />
<meta property="fc:frame:post_url" content="${process.env.NEXT_PUBLIC_BASE_URL}/api/frame?id=${nextId}" />
</head></html>`);
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 9 additions & 7 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ const frameMetadata = getFrameMetadata({
label: "Begin",
},
],
image: `${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/Qme4FXhoxHHfyzTfRxSpASbMF8kajLEPkRQWhwWu9pkUjm/0.png`,
image: `${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/bafybeieshch2n347ttuuuyfkkemydwg7sxfsaemalrp3f5bujt4p3fxrei/0.png`,
post_url: `${process.env.NEXT_PUBLIC_BASE_URL}/api/frame?id=1`,
});

export const metadata: Metadata = {
title: "Cosmic Cowboys",
description: "A frame telling the story of Cosmic Cowboys",
title: "Speed Run Ethereum",
description: "Learn how to build on Ethereum",
openGraph: {
title: "Cosmic Cowboys",
description: "A frame telling the story of Cosmic Cowboys",
images: [`${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/Qme4FXhoxHHfyzTfRxSpASbMF8kajLEPkRQWhwWu9pkUjm/0.png`],
title: "Speed Run Ethereum",
description: "Learn how to build on Ethereum",
images: [
`${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/bafybeieshch2n347ttuuuyfkkemydwg7sxfsaemalrp3f5bujt4p3fxrei/0.png`,
],
},
other: {
...frameMetadata,
Expand All @@ -27,7 +29,7 @@ export const metadata: Metadata = {
export default function Page() {
return (
<>
<h1>Cosmic Cowboys</h1>
<h1>Speed Run Ethereum</h1>
</>
);
}
3 changes: 3 additions & 0 deletions packages/nextjs/app/speedrunEthereum/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <h1>Redirecting...</h1>;
}
12 changes: 6 additions & 6 deletions packages/nextjs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ const nextConfig = {
async redirects() {
return [
{
source: "/cosmiccowboys",
destination: "https://cosmiccowboys.cloud",
source: "/speedrunEthereum",
destination: "https://speedrunethereum.com",
permanent: false,
},
{
source: "/pinatacloud",
destination: "https://www.pinata.cloud/blog/how-to-make-a-frame-on-farcaster-using-ipfs",
source: "/buidlGuidl",
destination: "https://buidlguidl.com",
permanent: false,
},
{
source: "/video",
destination: "https://youtu.be/wUt5NjXHSO4",
source: "/bgGeneralChat",
destination: "https://t.me/joinchat/KByvmRe5wkR-8F_zz6AjpA",
permanent: false,
},
];
Expand Down

0 comments on commit ff71f54

Please sign in to comment.