@@ -4,6 +4,17 @@ import ReactCalendar from 'react-calendar';
44import 'react-calendar/dist/Calendar.css' ;
55import CalendarActivitySection from './CalendarActivitySection' ;
66import styles from './CommunityCalendar.module.css' ;
7+ import {
8+ FaCalendarAlt ,
9+ FaClock ,
10+ FaMapMarkerAlt ,
11+ FaTag ,
12+ FaAlignLeft ,
13+ FaVideo ,
14+ FaUsers ,
15+ FaGlassCheers ,
16+ } from 'react-icons/fa' ;
17+ import { GrWorkshop } from 'react-icons/gr' ;
718
819const STATUSES = [ 'New' , 'Needs Attendees' , 'Filling Fast' , 'Full Event' ] ;
920const EVENT_TYPES = [ 'Workshop' , 'Webinar' , 'Meeting' , 'Social Gathering' ] ;
@@ -261,6 +272,21 @@ function CommunityCalendar() {
261272 [ darkMode ] ,
262273 ) ;
263274
275+ const getTypeIcon = type => {
276+ switch ( type ) {
277+ case 'Workshop' :
278+ return < GrWorkshop /> ;
279+ case 'Webinar' :
280+ return < FaVideo /> ;
281+ case 'Meeting' :
282+ return < FaUsers /> ;
283+ case 'Social Gathering' :
284+ return < FaGlassCheers /> ;
285+ default :
286+ return null ;
287+ }
288+ } ;
289+
264290 return (
265291 < div className = { calendarClasses . container } >
266292 { /* Inline styles to ensure selected date number is visible in dark mode - force dark background */ }
@@ -478,20 +504,28 @@ function CommunityCalendar() {
478504
479505 < div className = { styles . eventDetailsGrid } >
480506 { [
481- [ 'Type' , selectedEvent . type ] ,
482- [ 'Location' , selectedEvent . location ] ,
483- [ 'Date' , selectedEvent . date . toLocaleDateString ( ) ] ,
484- [ 'Time' , selectedEvent . time ] ,
485- ] . map ( ( [ label , value ] ) => (
507+ [ FaTag , 'Type' , selectedEvent . type ] ,
508+ [ FaMapMarkerAlt , 'Location' , selectedEvent . location ] ,
509+ [ FaCalendarAlt , 'Date' , selectedEvent . date . toLocaleDateString ( ) ] ,
510+ [ FaClock , 'Time' , selectedEvent . time ] ,
511+ ] . map ( ( [ Icon , label , value ] ) => (
486512 < div key = { label } className = { styles . detailItem } >
487- < span className = { styles . detailLabel } > { label } :</ span >
488- < span > { value } </ span >
513+ < span className = { styles . detailLabel } >
514+ < Icon className = { styles . detailIcon } />
515+ { label } :
516+ </ span >
517+ < span >
518+ { label === 'Type' ? getTypeIcon ( selectedEvent . type ) : null } { value }
519+ </ span >
489520 </ div >
490521 ) ) }
491522 </ div >
492523
493524 < div className = { styles . eventDescription } >
494- < span className = { styles . detailLabel } > Description:</ span >
525+ < span className = { styles . detailLabel } >
526+ < FaAlignLeft className = { styles . detailIcon } />
527+ Description:
528+ </ span >
495529 < p > { selectedEvent . description } </ p >
496530 </ div >
497531 </ div >
0 commit comments