From 1589c350265857e141cced909547b655e5e8c833 Mon Sep 17 00:00:00 2001 From: NicholaiVogel Date: Mon, 13 Oct 2025 01:14:35 -0600 Subject: [PATCH] added hovercard embeds --- src/components/Temp-Placeholder.tsx | 196 +++++++++++++++++++++------- 1 file changed, 147 insertions(+), 49 deletions(-) diff --git a/src/components/Temp-Placeholder.tsx b/src/components/Temp-Placeholder.tsx index e68adec..914e1fa 100644 --- a/src/components/Temp-Placeholder.tsx +++ b/src/components/Temp-Placeholder.tsx @@ -7,6 +7,24 @@ import { useEffect, useRef, useState } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { DepthMap } from "./DepthMap"; import Image from "next/image"; +import { HoverCard, HoverCardContent, HoverCardTrigger } from "@/components/ui/hover-card"; + +// Helper function to extract YouTube video ID from URL +function extractYouTubeVideoId(url: string): string | null { + const patterns = [ + /(?:youtube\.com\/watch\?v=|youtu\.be\/)([^&\n?#]+)/, + /youtube\.com\/embed\/([^&\n?#]+)/ + ]; + + for (const pattern of patterns) { + const match = url.match(pattern); + if (match) { + return match[1]; + } + } + + return null; +} export function TempPlaceholder() { const titleRef = useRef(null); @@ -273,67 +291,147 @@ export function TempPlaceholder() {
  • - - Post Malone - I Had Some Help
    - (feat. Morgan Wallen) - (feat. Morgan Wallen) -
    + + + + Post Malone - I Had Some Help
    + (feat. Morgan Wallen) + (feat. Morgan Wallen) +
    +
    + +