fix: share component

This commit is contained in:
veganbeef
2025-06-13 15:22:25 -07:00
parent 6a056cb30c
commit 8966dcee30
4 changed files with 35 additions and 91 deletions

View File

@@ -6,7 +6,10 @@ import sdk from "@farcaster/frame-sdk";
import { useMiniApp } from "@neynar/react";
type HeaderProps = {
neynarUser: any;
neynarUser?: {
fid: number;
score: number;
} | null;
};
export function Header({ neynarUser }: HeaderProps) {

View File

@@ -5,8 +5,15 @@ import { Button } from './Button';
import { useMiniApp } from '@neynar/react';
import { type ComposeCast } from "@farcaster/frame-sdk";
interface CastConfig extends ComposeCast.Options {
interface EmbedConfig {
path?: string;
url?: string;
imageUrl?: () => Promise<string>;
}
interface CastConfig extends Omit<ComposeCast.Options, 'embeds'> {
bestFriends?: boolean;
embeds?: (string | EmbedConfig)[];
}
interface ShareButtonProps {
@@ -82,7 +89,7 @@ export function ShareButton({ buttonText, cast, className = '', isLoading = fals
text: finalText,
embeds: processedEmbeds as [string] | [string, string] | undefined,
parent: cast.parent,
channel: cast.channelKey,
channelKey: cast.channelKey,
close: cast.close,
}, 'share-button');
} catch (error) {