@@ -2,8 +2,9 @@ import styled from "@emotion/styled";
22import Atropos from "atropos/react" ;
33import { AnimatePresence , motion , MotionProps } from "framer-motion" ;
44import { useEffect , useState } from "react" ;
5- import { Facebook , Linkedin , Twitter , Copy } from "react-feather" ;
5+ import { Facebook , Linkedin , Twitter , Copy , Calendar } from "react-feather" ;
66import toast , { Toaster } from "react-hot-toast" ;
7+ import { atcb_action , atcb_init } from "add-to-calendar-button" ;
78
89import { jsconfTheme , ViewportSizes } from "../../../styles/theme" ;
910import { GenericLink } from "../TicketSection/shared" ;
@@ -357,7 +358,9 @@ export const Ticket = ({
357358} ) => {
358359 const [ loaded , setLoaded ] = useState ( ! fadeIn ) ;
359360 const animation = useAnimation ( ) ;
361+
360362 useEffect ( ( ) => {
363+ atcb_init ( ) ;
361364 setTimeout ( ( ) => {
362365 setLoaded ( true ) ;
363366 } , 1100 ) ;
@@ -445,13 +448,32 @@ export const Ticket = ({
445448 < Facebook size = { 32 } />
446449 </ SocialAnchor >
447450 < SocialAnchor
448- href = { `https://www.linkedin.com/sharing/share-offsite?url=${ publicUrl } ` }
451+ href = { `https://www.linkedin.com/sharing/share-offsite?url=${ encodeURIComponent (
452+ publicUrl
453+ ) } `}
449454 target = "_blank"
450455 rel = "noreferrer"
451456 type = "linkedin"
452457 >
453458 < Linkedin size = { 32 } />
454459 </ SocialAnchor >
460+ < SocialButton
461+ onClick = { ( ) => {
462+ atcb_action ( {
463+ name : "JSConf Chile" ,
464+ startDate : "2023-03-03" ,
465+ endDate : "2023-03-04" ,
466+ startTime : "08:00" ,
467+ endTime : "19:00" ,
468+ description :
469+ "Acompáñanos, en la primera edición Chilena, de la más prestigiosa conferencia de JavaScript. 2 días de Charlistas internacionales, comunidad, aprendizaje y conexiones, este 03 y 04 de Febrero, 2023." ,
470+ options : [ "Google" , "Apple" , "Microsoft365" , "Outlook.com" ] ,
471+ timeZone : "America/Santiago" ,
472+ } ) ;
473+ } }
474+ >
475+ < Calendar size = { 32 } />
476+ </ SocialButton >
455477 < SocialButton
456478 onClick = { ( ) => {
457479 navigator . clipboard
0 commit comments