From 851fe059ab7ad11e46809da85de32a41f2228953 Mon Sep 17 00:00:00 2001 From: tiago-bacelar Date: Thu, 31 Mar 2022 20:18:06 +0100 Subject: [PATCH 1/2] Fixed date displayed on Schedule --- components/website/speakers/Schedule/index.jsx | 3 ++- components/website/utils/Schedule/index.jsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/website/speakers/Schedule/index.jsx b/components/website/speakers/Schedule/index.jsx index 00ce1847..ebbe38a4 100644 --- a/components/website/speakers/Schedule/index.jsx +++ b/components/website/speakers/Schedule/index.jsx @@ -72,7 +72,8 @@ export default function Schedule(props) { (_today.getMonth() + 1) + "/" + _today.getDate(); - const default_date = isAfter(today, min_date) ? today : min_date; + let default_date = isAfter(today, min_date) ? today : min_date; + default_date = isAfter(default_date, max_date) ? max_date : default_date; const [date, updateDate] = useState(default_date); diff --git a/components/website/utils/Schedule/index.jsx b/components/website/utils/Schedule/index.jsx index b78272fc..738be38c 100644 --- a/components/website/utils/Schedule/index.jsx +++ b/components/website/utils/Schedule/index.jsx @@ -99,7 +99,8 @@ export default function Schedule(props) { (_today.getMonth() + 1) + "/" + _today.getDate(); - const default_date = isAfter(today, min_date) ? today : min_date; + let default_date = isAfter(today, min_date) ? today : min_date; + default_date = isAfter(default_date, max_date) ? max_date : default_date; const [date, updateDate] = useState(default_date); const [hash, updateHash] = useState(""); From 8e535c9854083ebf3f9e02a17161d6ff7b0b6c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Brand=C3=A3o?= Date: Sat, 30 Jul 2022 19:21:42 +0100 Subject: [PATCH 2/2] Change date shown to first day --- components/website/speakers/Schedule/index.jsx | 8 ++++---- components/website/utils/Schedule/index.jsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/website/speakers/Schedule/index.jsx b/components/website/speakers/Schedule/index.jsx index ebbe38a4..f6ebf67b 100644 --- a/components/website/speakers/Schedule/index.jsx +++ b/components/website/speakers/Schedule/index.jsx @@ -73,7 +73,7 @@ export default function Schedule(props) { "/" + _today.getDate(); let default_date = isAfter(today, min_date) ? today : min_date; - default_date = isAfter(default_date, max_date) ? max_date : default_date; + default_date = isAfter(default_date, max_date) ? min_date : default_date; const [date, updateDate] = useState(default_date); @@ -106,14 +106,14 @@ export default function Schedule(props) { }; return ( -
+
-

+

During this week, you have the opportunity to interact with many recognized speakers, national, international and notorious companies!

-

+

You can get to know them better here.

diff --git a/components/website/utils/Schedule/index.jsx b/components/website/utils/Schedule/index.jsx index 738be38c..9aea27b7 100644 --- a/components/website/utils/Schedule/index.jsx +++ b/components/website/utils/Schedule/index.jsx @@ -100,7 +100,7 @@ export default function Schedule(props) { "/" + _today.getDate(); let default_date = isAfter(today, min_date) ? today : min_date; - default_date = isAfter(default_date, max_date) ? max_date : default_date; + default_date = isAfter(default_date, max_date) ? min_date : default_date; const [date, updateDate] = useState(default_date); const [hash, updateHash] = useState("");