File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import styles from '../css/ShortUpcomingEvent.module.css'
2
2
import useMediaQuery from '../utils/useMediaQuery'
3
- import allEvents from '../utils/upcomingEvents'
4
- // import UpcomingEvent from './UpcomingEvent'
3
+ import { byDate } from '../utils/upcomingEvents'
4
+ import UpcomingEvent from './UpcomingEvent'
5
5
6
6
const EventSelector = props => {
7
7
const isDesktop = useMediaQuery ( '(min-width: 600px)' )
8
+ const events = byDate . slice ( 0 , 3 ) ;
8
9
9
10
return (
10
11
< div
@@ -19,10 +20,9 @@ const EventSelector = props => {
19
20
< div
20
21
className = { isDesktop ? styles . eventsNotes : styles . eventsNotesMobile }
21
22
>
22
- { allEvents . map ( ( event , i ) => (
23
+ { events . map ( ( event , i ) => (
23
24
< >
24
- { /* TODO for future devs: uncomment below line when there are events*/ }
25
- { /* {i < 3 && (
25
+ {
26
26
< div className = { ! isDesktop && styles . notesMargin } >
27
27
< UpcomingEvent
28
28
primaryColor = { event . primaryColor && event . primaryColor }
@@ -36,14 +36,14 @@ const EventSelector = props => {
36
36
fbEvent = { event . fbEvent }
37
37
/>
38
38
</ div >
39
- )} */ }
39
+ }
40
40
</ >
41
41
) ) }
42
42
< p
43
43
style = { isDesktop ? { fontSize : '30px' } : { fontSize : '18px' } }
44
44
className = { styles . title }
45
45
>
46
- Stay tuned for future events
46
+ { events . length > 0 ? '' : ' Stay tuned for future events' }
47
47
</ p >
48
48
</ div >
49
49
</ div >
You can’t perform that action at this time.
0 commit comments