justinmahar / react-social-media-embed

📰 Easily embed social media posts from Facebook, Instagram, LinkedIn, Pinterest, TikTok, X (Twitter), and YouTube in React.
https://justinmahar.github.io/react-social-media-embed/
MIT License
228 stars 30 forks source link

tweetId should not be mandatory inside the TwitterTweetEmbedProps #84

Open jovan20min opened 2 months ago

jovan20min commented 2 months ago

twitterTweetEmbedProps?: TwitterTweetEmbedProps;

Hello, I noticed that the following TwitterTweetEmbedProps forces you to include the tweetId which is not necessary when using a url property. This is purely a TypeScript issue, but I think you should extend the TwitterTweetEmbedProps so that tweetId is not mandatory.

Example:

                    <XEmbed
                        url={url}
                        twitterTweetEmbedProps={{
                            tweetId: undefined, // just for the example
                            options: {
                                conversation: 'none',
                            },
                        }}
                    />