(link)
| 66 | |
| 67 | // Function to modify YouTube link (from watch to embed URL) |
| 68 | const modifyYouTubeLink = (link) => { |
| 69 | if (link.includes("youtube.com/watch?v=")) { |
| 70 | const videoId = link.split("youtube.com/watch?v=")[1]; |
| 71 | return `https://www.youtube.com/embed/${videoId}`; |
| 72 | } else { |
| 73 | return link; // Return unmodified link if it doesn't match expected format |
| 74 | } |
| 75 | }; |
| 76 | |
| 77 | const themeStyles = mode === 'dark' ? 'bg-gray-800 text-white' : 'bg-white text-gray-900'; |
| 78 |