"use client"; import CustomButton from "./CustomButton"; import { useRef, useEffect, useState } from 'react'; import Image from 'next/image'; import { CoursesProps, SettingsProps } from "@/types"; function convertToEmbedLink(watchLink: string): string { const videoIdMatch = watchLink.match(/(?:v=|\/)([a-zA-Z0-9_-]{11})/); if (videoIdMatch && videoIdMatch[1]) { const videoId = videoIdMatch[1]; return `https://www.youtube.com/embed/${videoId}`; } return watchLink; // Return original link if conversion fails } const Hero2 = ({ settings }: { settings: SettingsProps }) => { return (
) } export default Hero2