diff --git a/V b/V new file mode 100644 index 0000000000..8e313ab3b9 --- /dev/null +++ b/V @@ -0,0 +1,92 @@ +"use client" + +import { useState, useEffect } from "react" +import { Heart, Share2 } from "lucide-react" +import confetti from "canvas-confetti" + +export default function ValentinePage() { + const [showMessage, setShowMessage] = useState(false) + const [answer, setAnswer] = useState(null) + + useEffect(() => { + const timer = setTimeout(() => setShowMessage(true), 1000) + return () => clearTimeout(timer) + }, []) + + const handleAnswer = (response: "yes" | "no") => { + setAnswer(response) + if (response === "yes") { + confetti({ + particleCount: 100, + spread: 70, + origin: { y: 0.6 }, + }) + } + } + + const shareLink = () => { + if (navigator.share) { + navigator + .share({ + title: "¿Quieres ser mi San Valentín?", + url: window.location.href, + }) + .then(() => { + console.log("Gracias por compartir!") + }) + .catch(console.error) + } else { + // Fallback para navegadores que no soportan Web Share API + navigator.clipboard.writeText(window.location.href).then( + () => { + alert("Enlace copiado al portapapeles!") + }, + (err) => { + console.error("No se pudo copiar el texto: ", err) + }, + ) + } + } + + return ( +
+
+

Mi princesa hermosa Amarantha Perez

+
¿Quieres ser mi San Valentín?
+
+ + + +
+ {answer === null ? ( +
+ + +
+ ) : ( +
+ {answer === "yes" ? "¡Qué felicidad! ¡Te amo! ❤️" : "Oh, está bien. Quizás la próxima vez. 😢"} +
+ )} +
+ +
+ ) +} + +