diff --git a/src/components/CalendarCard.tsx b/src/components/CalendarCard.tsx index 59a6729..bcc9efa 100644 --- a/src/components/CalendarCard.tsx +++ b/src/components/CalendarCard.tsx @@ -23,7 +23,7 @@ END:VCALENDAR link.download = "posadev-2025.ics"; link.click(); }; - const handleGoogleCalendar = () => { + const getUrlGoogleCalendar = () => { // Hora UTC equivalente a 9:00 a.m. - 9:00 p.m. hora México (UTC−6) const start = "20251206T150000Z"; const end = "20251207T030000Z"; @@ -32,14 +32,14 @@ END:VCALENDAR const details = encodeURIComponent("Únete al evento Posadev 2025 en Guadalajara."); const location = encodeURIComponent("https://maps.app.goo.gl/8ayZ57xJf9Uvod6o7"); - const url = `https://www.google.com/calendar/render?action=TEMPLATE&text=${text}&dates=${start}/${end}&details=${details}&location=${location}`; - window.open(url, "_blank"); + return `https://www.google.com/calendar/render?action=TEMPLATE&text=${text}&dates=${start}/${end}&details=${details}&location=${location}`; }; return ( -
+ ); }; diff --git a/src/components/Shared.tsx b/src/components/Shared.tsx index ecd9825..d852496 100644 --- a/src/components/Shared.tsx +++ b/src/components/Shared.tsx @@ -6,20 +6,17 @@ import {ISpeaker} from "@/types/speakers.ts"; interface SharedProps { link: string, speaker: ISpeaker - blob: Blob } -const Shared: React.FC = ({link, speaker, blob }) => { +const Shared: React.FC = ({link, speaker }) => { const {toast, dismiss} = useToast(); - const file = new File([blob], speaker.profilePicture, { type: "image/png" }); const handleBrochureClick = async () => { if (navigator.share) { await navigator.share({ title: `Speaker: ${speaker.fullName}`, - text: "¡Mira este speaker de Posadev 2025!", - url: link, - files: [file] + text: "¡Mira a este speaker de Posadev 2025!", + url: link }); } else { await navigator.clipboard.writeText(link); diff --git a/src/components/SpeakerInfo.tsx b/src/components/SpeakerInfo.tsx index 01ad9db..f2166a7 100644 --- a/src/components/SpeakerInfo.tsx +++ b/src/components/SpeakerInfo.tsx @@ -4,13 +4,12 @@ import React, {useEffect, useState} from "react"; import {useLocation, useNavigate, useParams} from "react-router-dom"; import SocialMedia from "@/components/SocialMedia.tsx"; import {Badge} from "@/components/ui/badge.tsx"; -import {ArrowBigLeft, ChevronLeft, Speech} from "lucide-react"; +import { ChevronLeft, Speech} from "lucide-react"; import Gradient from "@/components/Gradient.tsx"; import {useAppContext} from "@/context/AppContext.tsx"; import {findSpeaker, scrollToTop} from "@/lib/utils.ts"; import Shared from "@/components/Shared.tsx"; import Loading from "@/components/Loading.tsx"; -import {Button} from "@/components/ui/button.tsx"; const SpeakerInfo = () => { const navigate = useNavigate() @@ -49,6 +48,7 @@ const SpeakerInfo = () => { ))} - +