File tree Expand file tree Collapse file tree 6 files changed +35
-19
lines changed
packages/playground/app/minikit Expand file tree Collapse file tree 6 files changed +35
-19
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,17 @@ import "./globals.css";
1414
1515export async function generateMetadata ( ) : Promise < Metadata > {
1616 return {
17- title : minikitConfig . frame . name ,
18- description : minikitConfig . frame . description ,
17+ title : minikitConfig . miniapp . name ,
18+ description : minikitConfig . miniapp . description ,
1919 other : {
20- "fc:frame " : JSON . stringify ( {
20+ "fc:miniapp " : JSON . stringify ( {
2121 version : "next" ,
22- imageUrl : minikitConfig . frame . heroImageUrl ,
22+ imageUrl : minikitConfig . miniapp . heroImageUrl ,
2323 button : {
24- title : `Launch ${ minikitConfig . frame . name } ` ,
24+ title : `Launch ${ minikitConfig . miniapp . name } ` ,
2525 action : {
26- name : `Launch ${ minikitConfig . frame . name } ` ,
27- type : "launch_frame " ,
26+ name : `Launch ${ minikitConfig . miniapp . name } ` ,
27+ type : "launch_miniapp " ,
2828 } ,
2929 } ,
3030 } ) ,
Original file line number Diff line number Diff line change @@ -17,7 +17,10 @@ export const minikitConfig = {
1717 signature :
1818 "MHhkZTA0ODk4YmE1MGMwMWM3ZWRlY2ViZWJkY2E0ZjA0ZTVlN2NkMTFiNWQxM2UxMjg4OWJiNzgwYTcyNWRhMGFlNTgyNGNlYmFiM2RjODdhNmIwYjNlNjExNTM1MjE1ODQ0MGI1NzU1ZTFhNGE3NzY5NDQwZWMyN2Y2NjhiYjY4NzFj" ,
1919 } ,
20- frame : {
20+ baseBuilder : {
21+ allowedAddresses : [ ] ,
22+ } ,
23+ miniapp : {
2124 version : "1" ,
2225 name : "minikit-example" ,
2326 subtitle : "" ,
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ export async function generateMetadata(): Promise<Metadata> {
1515 description :
1616 'Generated by `create-onchain --mini`, a Next.js template for MiniKit' ,
1717 other : {
18- 'fc:frame ' : JSON . stringify ( {
18+ 'fc:miniapp ' : JSON . stringify ( {
1919 version : 'next' ,
2020 imageUrl : 'https://onchainkit.xyz/playground/snake.png' ,
2121 button : {
2222 title : 'Launch MiniKit' ,
2323 action : {
24- type : 'launch_frame ' ,
24+ type : 'launch_miniapp ' ,
2525 name : 'MiniKit' ,
2626 url : 'https://onchainkit.xyz/playground/minikit' ,
2727 splashImageUrl : 'https://onchainkit.xyz/playground/snake.png' ,
Original file line number Diff line number Diff line change @@ -7,17 +7,17 @@ import "./globals.css";
77
88export async function generateMetadata ( ) : Promise < Metadata > {
99 return {
10- title : minikitConfig . frame . name ,
11- description : minikitConfig . frame . description ,
10+ title : minikitConfig . miniapp . name ,
11+ description : minikitConfig . miniapp . description ,
1212 other : {
13- "fc:frame " : JSON . stringify ( {
14- version : minikitConfig . frame . version ,
15- imageUrl : minikitConfig . frame . heroImageUrl ,
13+ "fc:miniapp " : JSON . stringify ( {
14+ version : minikitConfig . miniapp . version ,
15+ imageUrl : minikitConfig . miniapp . heroImageUrl ,
1616 button : {
17- title : `Launch ${ minikitConfig . frame . name } ` ,
17+ title : `Launch ${ minikitConfig . miniapp . name } ` ,
1818 action : {
19- name : `Launch ${ minikitConfig . frame . name } ` ,
20- type : "launch_frame " ,
19+ name : `Launch ${ minikitConfig . miniapp . name } ` ,
20+ type : "launch_miniapp " ,
2121 } ,
2222 } ,
2323 } ) ,
Original file line number Diff line number Diff line change 11"use client" ;
2+ import { useEffect } from "react" ;
23import Image from "next/image" ;
34import { Wallet } from "@coinbase/onchainkit/wallet" ;
5+ import { useMiniKit } from "@coinbase/onchainkit/minikit" ;
46// import { useQuickAuth } from "@coinbase/onchainkit/minikit";
57import styles from "./page.module.css" ;
68
@@ -14,6 +16,14 @@ export default function Home() {
1416 // userFid: string;
1517 // }>("/api/auth");
1618
19+ const { setFrameReady, isFrameReady } = useMiniKit ( ) ;
20+
21+ useEffect ( ( ) => {
22+ if ( ! isFrameReady ) {
23+ setFrameReady ( ) ;
24+ }
25+ } , [ setFrameReady , isFrameReady ] ) ;
26+
1727 return (
1828 < div className = { styles . container } >
1929 < header className = { styles . headerWrapper } >
Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ export const minikitConfig = {
1414 payload : "" ,
1515 signature : "" ,
1616 } ,
17- frame : {
17+ baseBuilder : {
18+ allowedAddresses : [ ] ,
19+ } ,
20+ miniapp : {
1821 version : "1" ,
1922 name : "APP_NAME" ,
2023 subtitle : "" ,
You can’t perform that action at this time.
0 commit comments