From ff1be589be9426711335f41e5f910d5a18f6596c Mon Sep 17 00:00:00 2001 From: Juan Pablo Barrera Date: Fri, 21 Jul 2023 11:04:43 -0500 Subject: [PATCH 1/4] Fix typo in participants --- src/components/Participantes/Participantes.astro | 4 ++-- src/components/Schedule.astro | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Participantes/Participantes.astro b/src/components/Participantes/Participantes.astro index 327a4df..37a745f 100644 --- a/src/components/Participantes/Participantes.astro +++ b/src/components/Participantes/Participantes.astro @@ -24,14 +24,14 @@ const participants: Participant[] = [ type: 2, }, { - name: 'David Rodriguez - Xerosec', + name: 'David Rodríguez - Xerosec', title: 'El camino menos transitado: Como llegué al sector IT a los 35 añazos', img: 'https://www.tuasesordemoda.com/wp-content/uploads/2022/11/cortes-cara-cuadrada-mujer-.jpeg', hora: '21:30 H', type: 1, }, { - name: 'Anais Fernandez Villar', + name: 'Anaís Fernández Villar', title: 'Magicals Girls UI: Los secretos de la animacion en Figma', img: 'https://www.tuasesordemoda.com/wp-content/uploads/2022/11/cortes-cara-cuadrada-mujer-.jpeg', hora: '22:00 H', diff --git a/src/components/Schedule.astro b/src/components/Schedule.astro index fd9225c..70f7e29 100644 --- a/src/components/Schedule.astro +++ b/src/components/Schedule.astro @@ -9,7 +9,7 @@ const items: typeItem[] = [ type: 'presentation', url: '/imgs/JoseManuel.webp', date: '2023-07-21T20:00:00+02:00', - speaker: 'Jose Manuel Ortega Falcón', + speaker: 'José Manuel Ortega Falcón', }, { name: 'Mi Experiencia como Desarrollador Junior en Latinoamérica: ¿Un Viaje hacia el Éxito?', @@ -29,7 +29,7 @@ const items: typeItem[] = [ type: 'presentation', url: '/imgs/Xero.webp', date: '2023-07-21T21:30:00+02:00', - speaker: 'David Rodriguez - Xerosec', + speaker: 'David Rodríguez - Xerosec', }, { name: 'Magical girls UI: los secretos de la animación en Figma', @@ -49,7 +49,7 @@ const items: typeItem[] = [ type: 'presentation', url: '/imgs/Kuro.webp', date: '2023-07-21T23:00:00+02:00', - speaker: 'David Huertos - Ikurotime', + speaker: 'David Huertas - Ikurotime', }, ] --- From 0600fd36fa2baae35b5ec3c9ae4d2bc78fe5f500 Mon Sep 17 00:00:00 2001 From: Juan Pablo Barrera Date: Fri, 21 Jul 2023 11:05:04 -0500 Subject: [PATCH 2/4] Fix name speaker in schedule --- src/components/ScheduleItem.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ScheduleItem.tsx b/src/components/ScheduleItem.tsx index dcb38c4..f2f6dfd 100644 --- a/src/components/ScheduleItem.tsx +++ b/src/components/ScheduleItem.tsx @@ -20,7 +20,7 @@ export default function ScheduleItem({ className="w-[150px] h-[150px] rounded-full object-cover" /> )} -
+

{type === 'presentation' && ( -

+

{speaker}

)} From 7837f02b10fddd07ef2074398a5437a62ca8b22d Mon Sep 17 00:00:00 2001 From: Juan Pablo Barrera Date: Fri, 21 Jul 2023 12:36:25 -0500 Subject: [PATCH 3/4] Add iframe Twitch channel --- src/components/SectionTimer.tsx | 27 +++++++++++++++++++++++++++ src/pages/index.astro | 16 ++-------------- src/utils/calculateTimeLeft.js | 7 ++++++- 3 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 src/components/SectionTimer.tsx diff --git a/src/components/SectionTimer.tsx b/src/components/SectionTimer.tsx new file mode 100644 index 0000000..6fce6b3 --- /dev/null +++ b/src/components/SectionTimer.tsx @@ -0,0 +1,27 @@ +import { useMemo } from 'react' +import { calculateDifference } from '../utils/calculateTimeLeft' +import Countdown from './Countdown.jsx' + +const SectionTimer = () => { + const timeLeft = useMemo( + () => calculateDifference('2023-07-21T19:00:00+02:00'), [] + ) + + return ( + timeLeft > 0 ? +
+

Quedan

+ +

+ Para el AforShow +

+
+ : + + ) +} + +export default SectionTimer diff --git a/src/pages/index.astro b/src/pages/index.astro index d700b3e..6baa74f 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,5 +1,5 @@ --- -import Countdown from '../components/Countdown.jsx' +import SectionTimer from '../components/SectionTimer.jsx' import Header from '../components/Header.astro' import Ticket from '../components/Ticket/Ticket' import Faq from '../components/Faq.jsx' @@ -51,19 +51,7 @@ const ogTitle = >
-
-

Quedan

- -

- Para el AforShow -

-
+ diff --git a/src/utils/calculateTimeLeft.js b/src/utils/calculateTimeLeft.js index a2fdcf1..33694eb 100644 --- a/src/utils/calculateTimeLeft.js +++ b/src/utils/calculateTimeLeft.js @@ -1,6 +1,6 @@ import { getLocalTime } from './getLocalTime' -export function calculateTimeLeft(time) { +export function calculateTimeLeft (time) { const { fulltime } = getLocalTime(time) const difference = new Date(fulltime) - new Date() @@ -37,3 +37,8 @@ export function calculateTimeLeft(time) { return timeLeft } + +export function calculateDifference (time) { + const { fulltime } = getLocalTime(time) + return new Date(fulltime) - new Date() +} From d5d9a9aaacdf00487ad50b4d9cc21a92029d2c64 Mon Sep 17 00:00:00 2001 From: Juan Pablo Barrera Date: Fri, 21 Jul 2023 12:39:55 -0500 Subject: [PATCH 4/4] Fix time --- src/components/SectionTimer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SectionTimer.tsx b/src/components/SectionTimer.tsx index 6fce6b3..ffe696e 100644 --- a/src/components/SectionTimer.tsx +++ b/src/components/SectionTimer.tsx @@ -4,7 +4,7 @@ import Countdown from './Countdown.jsx' const SectionTimer = () => { const timeLeft = useMemo( - () => calculateDifference('2023-07-21T19:00:00+02:00'), [] + () => calculateDifference('2023-07-21T20:00:00+02:00'), [] ) return (