fix(youtube): interpolate videoId in the share-to-X tweet text

The share button built the tweet text from a single-quoted string containing ${videoId}, so it shared the literal 'watch?v=${videoId}' instead of the actual video URL. Use a template literal so videoId interpolates.
This commit is contained in:
simoleo89
2026-06-17 21:57:13 +02:00
parent 1b032bcd23
commit 9ad4dab471
+1 -1
View File
@@ -637,7 +637,7 @@ export const YouTubePlayerView: FC<{}> = () =>
if (videoId) if (videoId)
{ {
const url = `https://twitter.com/intent/tweet?text=${encodeURIComponent( const url = `https://twitter.com/intent/tweet?text=${encodeURIComponent(
'Now watching: https://youtube.com/watch?v=${videoId}', `Now watching: https://youtube.com/watch?v=${videoId}`,
)}`; )}`;
window.open(url, '_blank'); window.open(url, '_blank');
} }