diff --git a/apps/base-docs/tutorials/docs/0_deploy-with-foundry.md b/apps/base-docs/tutorials/docs/0_deploy-with-foundry.md index bd1784dff3..2fce09022e 100644 --- a/apps/base-docs/tutorials/docs/0_deploy-with-foundry.md +++ b/apps/base-docs/tutorials/docs/0_deploy-with-foundry.md @@ -130,7 +130,7 @@ To add the OpenZeppelin Contracts library to your project, run: forge install openzeppelin/openzeppelin-contracts ``` -In your project, delete the `src/Counter.sol` contract that was generated with the project and add the above code in a new file called `contracts/NFT.sol`. (You can also delete the `test/Counter.t.sol` and `script/Counter.s.sol` files, but you should add your own tests ASAP!). +In your project, delete the `src/Counter.sol` contract that was generated with the project and add the above code in a new file called `src/NFT.sol`. (You can also delete the `test/Counter.t.sol` and `script/Counter.s.sol` files, but you should add your own tests ASAP!). To compile our basic NFT contract using Foundry, run: diff --git a/apps/web/app/frames/img-proxy/route.ts b/apps/web/app/frames/img-proxy/route.ts new file mode 100644 index 0000000000..e7e1d47ea4 --- /dev/null +++ b/apps/web/app/frames/img-proxy/route.ts @@ -0,0 +1,29 @@ +import { NextRequest, NextResponse } from 'next/server'; + +export async function GET(request: NextRequest) { + const { searchParams } = new URL(request.url); + const url = searchParams.get('url'); + + if (!url) { + return NextResponse.json({ error: 'Missing url' }, { status: 400 }); + } + + try { + const response = await fetch(url); + if (!response.ok) { + throw new Error(`Failed to fetch image: ${response.statusText}`); + } + const contentType = response.headers.get('content-type'); + const imageBuffer = await response.arrayBuffer(); + return new NextResponse(imageBuffer, { + status: 200, + headers: { + 'Content-Type': contentType ?? 'application/octet-stream', + 'Cache-Control': 'public, max-age=86400', + }, + }); + } catch (error) { + console.error('Error fetching image:', error); + return NextResponse.json({ error: 'Failed to fetch image' }, { status: 500 }); + } +} diff --git a/apps/web/app/frames/route.tsx b/apps/web/app/frames/route.ts similarity index 100% rename from apps/web/app/frames/route.tsx rename to apps/web/app/frames/route.ts diff --git a/apps/web/src/components/Basenames/ConfigureFramesPageContent/FrameBuilder.tsx b/apps/web/src/components/Basenames/ConfigureFramesPageContent/FrameBuilder.tsx index 7f90a4f503..49f93d3daf 100644 --- a/apps/web/src/components/Basenames/ConfigureFramesPageContent/FrameBuilder.tsx +++ b/apps/web/src/components/Basenames/ConfigureFramesPageContent/FrameBuilder.tsx @@ -483,7 +483,7 @@ export default function FrameBuilder() { alt="preview frame" /> ) : ( - + )}