Skip to content

Commit

Permalink
Merge pull request #392 from cesium/tb/schedule-fix
Browse files Browse the repository at this point in the history
Fixed date displayed on Schedule
  • Loading branch information
miguelbrandao authored Aug 6, 2022
2 parents 3e21e26 + 8e535c9 commit 66b882c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions components/website/speakers/Schedule/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) ? min_date : default_date;

const [date, updateDate] = useState(default_date);

Expand Down Expand Up @@ -105,14 +106,14 @@ export default function Schedule(props) {
};

return (
<section className="spacing relative bg-secondary pb-20 lg:pt-10 2xl:grid 2xl:grid-cols-2">
<section className="spacing bg-secondary relative pb-20 lg:pt-10 2xl:grid 2xl:grid-cols-2">
<div className="relative z-50 mb-10 grid place-items-center text-white sm:flex sm:flex-col md:mr-10 md:place-items-start">
<Day date={date} previousDay={previous_day} nextDay={next_day} />
<p className="text-md mt-10 w-5/6 font-iregular md:px-20">
<p className="text-md font-iregular mt-10 w-5/6 md:px-20">
During this week, you have the opportunity to interact with many
recognized speakers, national, international and notorious companies!
</p>
<p className="text-md mt-4 w-5/6 font-iregular md:px-20">
<p className="text-md font-iregular mt-4 w-5/6 md:px-20">
You can get to know them better here.
</p>
</div>
Expand Down
3 changes: 2 additions & 1 deletion components/website/utils/Schedule/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) ? min_date : default_date;

const [date, updateDate] = useState(default_date);
const [hash, updateHash] = useState("");
Expand Down

0 comments on commit 66b882c

Please sign in to comment.