Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 9dd16ac

Browse files
author
Jhonny Michel
committed
showing location of talks
1 parent 951d491 commit 9dd16ac

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

src/js/schedule-app/Store.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,23 @@ class Store extends React.Component {
143143
}
144144

145145
filterEvents(acc, { date, events }) {
146-
const rooms = ['Sala Tapioca', 'Sala Rapadura', 'Sala Macaxeira', 'Sala Jerimum'];
146+
const rooms = ['Sala Tapioca', 'Sala Rapadura', 'Sala Macaxeira', 'Sala Jerimum']
147+
.reverse();
147148
const filteredEvents = events.filter(event => (
148149
this.state.typeFilter.includes(event.details.eventType)
149150
&& (!event.details.category || this.state.categoryFilter.includes(event.details.category))
150151
&& (!this.state.searchFilter || this.checkSearchMatch(event))
151-
)).sort((a, b) => {
152-
const room = indexOf()
152+
));
153+
154+
filteredEvents.sort((a, b) => {
155+
const roomA = rooms.indexOf(a.location);
156+
const roomB = rooms.indexOf(b.location);
157+
158+
if (roomA === roomB) {
159+
return 0;
160+
}
161+
162+
return roomA > roomB ? 1 : -1;
153163
})
154164
if (filteredEvents.length)
155165
return [ ...acc, { date, events: filteredEvents } ];

src/js/schedule-app/components/Events.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ const EventTypes = (event) => ({
2222
<h4 className="schedule_office">
2323
{event.details.title}
2424
</h4>
25-
<h4 className="schedule_office">
26-
{event.location}
25+
<h4 className="schedule_location">
26+
<i className="material-icons">location_on</i>{event.location}
2727
</h4>
2828
</React.Fragment>
2929
),
@@ -41,8 +41,8 @@ const EventTypes = (event) => ({
4141
<h4 className="schedule_office">
4242
{event.details.title}
4343
</h4>
44-
<h4 className="schedule_office">
45-
{event.location}
44+
<h4 className="schedule_location">
45+
<i className="material-icons">location_on</i>{event.location}
4646
</h4>
4747
</React.Fragment>
4848
),
@@ -62,8 +62,8 @@ const EventTypes = (event) => ({
6262
<h4 className="schedule_office">
6363
{event.details.title}
6464
</h4>
65-
<h4 className="schedule_office">
66-
{event.location}
65+
<h4 className="schedule_location">
66+
<i className="material-icons">location_on</i>{event.location}
6767
</h4>
6868
</React.Fragment>
6969
),
@@ -75,8 +75,8 @@ const EventTypes = (event) => ({
7575
<h3 className="schedule_speaker">
7676
{event.details.description}
7777
</h3>
78-
<h4 className="schedule_office">
79-
{event.location}
78+
<h4 className="schedule_location">
79+
<i className="material-icons">location_on</i>{event.location}
8080
</h4>
8181
</React.Fragment>
8282
),

src/scss/intern-pages/_schedule.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,16 @@
326326
color: rgba($background-light, 0.6);
327327
}
328328

329+
.schedule_location {
330+
@extend .schedule_office;
331+
@extend .d-flex;
332+
@extend .align-items-center;
333+
.material-icons {
334+
font-size: inherit;
335+
margin-right: 5px;
336+
}
337+
}
338+
329339
.schedule_speaker {
330340
font-size: 14px;
331341
font-weight: 400;

0 commit comments

Comments
 (0)