Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions src/data/schedule.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
]
},
{
"time": "16:15",
"time": "16:25",
"type": "sponsor",
"events": [
{
Expand Down Expand Up @@ -339,7 +339,7 @@
]
},
{
"time": "15:15",
"time": "15:30",
"type": "talk",
"events": [
{
Expand All @@ -358,11 +358,20 @@
},
{
"time": "16:15",
"type": "free",
"events": [
{
"title": "Coffee Break"
}
]
},
{
"time": "16:30",
"type": "sponsor",
"events": [
{
"room": "main",
"title": "EAFIT (Sponsor Space)"
"title": "EAFIT: Vide Coding sin mitos: De cero a producto en tiempo record."
}
]
},
Expand Down Expand Up @@ -404,7 +413,7 @@
]
},
{
"time": "08:30",
"time": "08:00",
"type": "talk",
"events": [
{
Expand Down Expand Up @@ -554,11 +563,11 @@
},
{
"time": "16:30",
"type": "sponsor",
"type": "talk",
"events": [
{
"room": "main",
"title": "Sponsor Space"
"title": "Lightning talks"
}
]
},
Expand Down
12 changes: 11 additions & 1 deletion src/pages/Schedule/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import { useState, useEffect } from 'react';
import { NavLink } from 'react-router-dom';

import { Col, Container, Row, Button } from 'react-bootstrap';
Expand Down Expand Up @@ -74,16 +74,26 @@ const Schedule = () => {
const currentIndex = schedule.findIndex(d => d.date === currentDate.date);
if (currentIndex < schedule.length - 1) {
setCurrentDate(schedule[currentIndex + 1]);
localStorage.setItem('currentDatePyCon', schedule[currentIndex + 1].date);
}
};

const handlePreviousDay = () => {
const currentIndex = schedule.findIndex(d => d.date === currentDate.date);
if (currentIndex > 0) {
setCurrentDate(schedule[currentIndex - 1]);
localStorage.setItem('currentDatePyCon', schedule[currentIndex - 1].date);
}
};

useEffect(() => {
const currentDatePyCon = localStorage.getItem('currentDatePyCon');

if (currentDatePyCon) {
setCurrentDate(schedule.find(d => d.date === currentDatePyCon));
}
}, []);

return (
<div className={`generic-page keynotes-page schedule-page`}>
<div className="generic-page-wrapper keynotes-bg">
Expand Down