mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-12-07 09:52:31 -05:00
fix: share component
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user