Skip to content

Commit

Permalink
Fix: Claim Frame on /names (#921)
Browse files Browse the repository at this point in the history
* claim frame on /names

* new tx submitted image
  • Loading branch information
brendan-defi authored Aug 23, 2024
1 parent 7a5baf3 commit c9bce18
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/web/app/(basenames)/names/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import RegistrationValueProp from 'apps/web/src/components/Basenames/Registratio
import type { Metadata } from 'next';
import { Suspense } from 'react';
import basenameCover from './basename_cover.png';
import { initialFrame } from 'apps/web/pages/api/basenames/frame/frameResponses';

export const metadata: Metadata = {
metadataBase: new URL('https://base.org'),
Expand All @@ -22,6 +23,9 @@ export const metadata: Metadata = {
site: '@base',
card: 'summary_large_image',
},
other: {
...(initialFrame as Record<string, string>),
},
};

export default async function Page() {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion apps/web/pages/api/basenames/frame/frameResponses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getFrameMetadata, getFrameHtmlResponse } from '@coinbase/onchainkit/fra
import { FrameMetadataResponse } from '@coinbase/onchainkit/frame/types';
import initialImage from 'apps/web/pages/api/basenames/frame/assets/initial-image.png';
import searchImage from 'apps/web/pages/api/basenames/frame/assets/search-image.png';
import txSubmittedImage from 'apps/web/pages/api/basenames/frame/assets/tx-submitted.png'
import { DOMAIN } from 'apps/web/pages/api/basenames/frame/constants';

export const initialFrame: FrameMetadataResponse = getFrameMetadata({
Expand Down Expand Up @@ -118,6 +119,6 @@ export const txSuccessFrame = (name: string) =>
},
],
image: {
src: `${DOMAIN}/images/basenames/contract-uri/feature-image.png`,
src: `${DOMAIN}/${txSubmittedImage}`,
},
});

0 comments on commit c9bce18

Please sign in to comment.