diff --git a/README.md b/README.md index c45915f..38255d0 100644 --- a/README.md +++ b/README.md @@ -295,11 +295,11 @@ Now open the Frame Playground on Warpcast mobile, by visiting [https://warpcast. Enter your ngrok URL: -![Frames Playground](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/1_playground.png) +Frames Playground ..and tap "Launch" to open your app. -![Launch](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/2_blank.png) +Launch If you watch your dev server and ngrok logs, you'll see a request to your server. But nothing will load until we signal to Warpcast that our app is `ready()`. @@ -307,11 +307,11 @@ If you watch your dev server and ngrok logs, you'll see a request to your server To give frames a consistent loading experience, clients display a splash screen and image until the app calls `sdk.actions.ready()`. In order to make it more visible here, let's add a splash image and loading color: -![Config](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/3_config.png) +Config Now we get a nice background color and splash image: -![Splash](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/4_splash.png) +Splash Let's call `ready()` to load our app. We'll call `sdk.actions.ready()` in an effect on render, which tells the parent Farcaster app that our frame is ready to render and hides the splash screen: @@ -342,7 +342,7 @@ export default function Demo() { Try again in the playground and we'll see our app: -![Hello](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/5_hello.png) +Hello ### Viewing context @@ -379,11 +379,27 @@ export default function Demo() {

Context

-
-
-            {JSON.stringify(context, null, 2)}
-          
-
+ + + {isContextOpen && ( +
+
+              {JSON.stringify(context, null, 2)}
+            
+
+ )}
); @@ -395,7 +411,7 @@ When you load this in the Warpcast frames playground, you should see your own Fa > [!WARNING] > For the Framesgiving developer preview, context data is unauthenticated. Assume this data is spoofable and don't use it to grant privileged access to the user! Future frame SDK releases will include a mechanism fo verify context data. -![Context](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/6_context.png) +Context This is a lot of data, so let's hide it behind a simple toggle: @@ -457,7 +473,7 @@ export default function Demo() { } ``` -![Toggle](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/7_toggle.png) +Toggle ### Invoking actions @@ -516,11 +532,11 @@ export default function Demo() { } ``` -![Actions](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/8_actions.png) +Actions Tap the button and you'll be directed to an external URL. -![URL](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/9_url.png) +URL Let's add another button to call `close()`: @@ -585,7 +601,7 @@ export default function Demo() { } ``` -![URL](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/10_close.png) +URL When you tap this, the frame should close. @@ -641,7 +657,7 @@ export default function Demo() { } ``` -![Wallet](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/10_wallet.png) +Wallet If your wallet is connected to Warpcast, you should see its address. In case it's not, let's add a connect/disconnect button. Note that we'll need to import our Wagmi config to `connect`: @@ -845,11 +861,11 @@ export default function Demo() { } ``` -![Tx](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/10_tx.png) +Tx Tap "Send Transaction" and you'll be directed to your wallet. -![Yoink](https://raw.githubusercontent.com/farcasterxyz/frames-v2-demo/refs/heads/main/docs/img/12_yoink.png) +Yoink ### Signatures