Skip to content

Commit ea6e3a1

Browse files
authored
Lego 0007/rrss details v2 (#123)
1 parent 1fe0a73 commit ea6e3a1

File tree

4 files changed

+785
-3
lines changed

4 files changed

+785
-3
lines changed

package-lock.json

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@tanstack/react-query": "^4.10.3",
2929
"@tanstack/react-query-devtools": "^4.11.0",
3030
"@types/canvas-confetti": "^1.6.0",
31+
"add-to-calendar-button": "^1.18.8",
3132
"atropos": "^1.0.2",
3233
"canvas-confetti": "^1.6.0",
3334
"csstype": "^3.0.11",

src/Components/Ticket/Ticket.tsx

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import styled from "@emotion/styled";
22
import Atropos from "atropos/react";
33
import { AnimatePresence, motion, MotionProps } from "framer-motion";
44
import { useEffect, useState } from "react";
5-
import { Facebook, Linkedin, Twitter, Copy } from "react-feather";
5+
import { Facebook, Linkedin, Twitter, Copy, Calendar } from "react-feather";
66
import toast, { Toaster } from "react-hot-toast";
7+
import { atcb_action, atcb_init } from "add-to-calendar-button";
78

89
import { jsconfTheme, ViewportSizes } from "../../../styles/theme";
910
import { 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

Comments
 (0)