Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dc frame previews #340

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

feat: dc frame previews #340

wants to merge 4 commits into from

Conversation

dalechyn
Copy link
Collaborator

No description provided.

@dalechyn dalechyn self-assigned this May 30, 2024
Copy link

vercel bot commented May 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frog 🛑 Canceled (Inspect) May 30, 2024 8:47pm
frog-auth ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2024 8:47pm
frog-frame ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2024 8:47pm

Comment on lines +191 to +213
/**
* Path of the next frame.
*
* @example '/submit'
*/
action?: FrameResponse['action']
/**
* HTTP response headers.
*/
headers?: FrameResponse['headers']
/**
* An icon ID.
*
* @see https://warpcast.notion.site/Spec-Farcaster-Actions-84d5a85d479a43139ea883f6823d8caa
* @example `'log'`
*/
icon?: Octicon
/**
* Title of the frame (added as `og:title`).
*
* @example 'Hello Frog'
*/
title?: FrameResponse['title']
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if we can inherit those docs from FrameResponse – without the comment it doesn't seem to pull up.

Comment on lines +214 to +243
} & (
| {
/**
* Preview Image to render for the frame. Can either be a JSX element, or URL.
*
* @example
* <div style={{ fontSize: 60 }}>Hello Frog</div>
*/
image?: JSX.Element
/**
* Image options.
*
* @see https://vercel.com/docs/functions/og-image-generation/og-image-api
*
* @example
* { width: 1200, height: 630 }
*/
imageOptions?: Pretty<Omit<ImageOptions, 'fonts'>> | undefined
}
| {
/**
* Preview Image to render for the frame. Can either be a JSX element, or URL.
*
* @example
* "https://i.ytimg.com/vi/R3UACX5eULI/maxresdefault.jpg"
*/
image?: string
imageOptions?: never
}
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cannot do a Pick<FrameResponse, 'image' | 'imageOptions'> as it breaks discriminated union.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant