11/* Announcements/Announcements.jsx */
22import { useState } from 'react' ;
3- import './Announcements.css' ;
3+ import styles from './Announcements.module .css' ;
44import { useSelector } from 'react-redux' ;
55import { Nav , NavItem , NavLink , TabContent , TabPane } from 'reactstrap' ;
66import classnames from 'classnames' ;
77import SocialMediaComposer from './SocialMediaComposer' ;
88import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
9- import { faEnvelope } from '@fortawesome/free-solid-svg-icons' ;
9+ import {
10+ faEnvelope ,
11+ faVideo ,
12+ faNewspaper ,
13+ faImage ,
14+ faChartLine ,
15+ } from '@fortawesome/free-solid-svg-icons' ;
1016import { faFacebook , faLinkedin , faMedium } from '@fortawesome/free-brands-svg-icons' ;
1117import ReactTooltip from 'react-tooltip' ;
12- import EmailPanel from './platforms/email' ; // ← new
18+ import EmailPanel from './platforms/email' ;
1319
1420function Announcements ( { title, email : initialEmail } ) {
1521 const [ activeTab , setActiveTab ] = useState ( 'email' ) ;
@@ -23,13 +29,24 @@ function Announcements({ title, email: initialEmail }) {
2329 return '#0077B5' ;
2430 case 'medium' :
2531 return '#00ab6c' ;
32+ case 'video' :
33+ return '#FF0000' ;
34+ case 'article' :
35+ return '#4285f4' ;
36+ case 'photo' :
37+ return '#E91E63' ;
38+ case 'weeklyreport' :
39+ return '#00C853' ;
2640 default :
2741 return null ;
2842 }
2943 } ;
3044
3145 const tabs = [
32- { id : 'email' , icon : faEnvelope , label : 'Email' } ,
46+ { id : 'weeklyreport' , icon : faChartLine , label : 'Weekly Report' } ,
47+ { id : 'photo' , icon : faImage , label : 'Photo' } ,
48+ { id : 'video' , icon : faVideo , label : 'Video' } ,
49+ { id : 'article' , icon : faNewspaper , label : 'Article' } ,
3350 { id : 'x' , label : 'X' , customIconSrc : 'social-media-logos/x_icon.png' } ,
3451 { id : 'facebook' , icon : faFacebook , label : 'Facebook' } ,
3552 { id : 'linkedin' , icon : faLinkedin , label : 'LinkedIn' } ,
@@ -42,11 +59,9 @@ function Announcements({ title, email: initialEmail }) {
4259 { id : 'reddit' , label : 'Reddit' , customIconSrc : 'social-media-logos/reddit_icon.png' } ,
4360 { id : 'tumblr' , label : 'Tumblr' , customIconSrc : 'social-media-logos/tumblr_icon.png' } ,
4461 { id : 'imgur' , label : 'Imgur' , customIconSrc : 'social-media-logos/imgur_icon.png' } ,
45- { id : 'diigo' , label : 'Diigo' , customIconSrc : 'social-media-logos/diigo_icon.png' } ,
4662 { id : 'myspace' , label : 'Myspace' , customIconSrc : 'social-media-logos/myspace_icon.png' } ,
4763 { id : 'medium' , icon : faMedium , label : 'Medium' } ,
4864 { id : 'plurk' , label : 'Plurk' , customIconSrc : 'social-media-logos/plurk_icon.png' } ,
49- { id : 'bitily' , label : 'Bitily' , customIconSrc : 'social-media-logos/bitily_icon.png' } ,
5065 {
5166 id : 'livejournal' ,
5267 label : 'LiveJournal' ,
@@ -59,6 +74,7 @@ function Announcements({ title, email: initialEmail }) {
5974 label : 'Truth Social' ,
6075 customIconSrc : 'social-media-logos/truthsocial_icon.png' ,
6176 } ,
77+ { id : 'email' , icon : faEnvelope , label : 'Email' } ,
6278 ] ;
6379
6480 const columns = Math . ceil ( tabs . length / 2 ) ;
@@ -71,28 +87,34 @@ function Announcements({ title, email: initialEmail }) {
7187 return (
7288 < div className = { darkMode ? 'bg-oxford-blue text-light' : '' } style = { { minHeight : '100%' } } >
7389 < Nav
74- className = { classnames ( 'tab-grid' , { 'two-rows' : columns === 2 , dark : darkMode } ) }
90+ className = { classnames ( styles . tabGrid , {
91+ [ styles . twoRows ] : columns === 2 ,
92+ [ styles . dark ] : darkMode ,
93+ } ) }
7594 style = { gridStyle }
7695 >
7796 { tabs . map ( ( { id, icon, label, customIconSrc } ) => (
78- < NavItem key = { id } >
97+ < NavItem key = { id } className = { styles . navItem } >
7998 < NavLink
8099 data-tip = { label }
81- className = { classnames ( 'tab-nav-item' , { active : activeTab === id , dark : darkMode } ) }
100+ className = { classnames ( styles . navLink , styles . tabNavItem , {
101+ [ styles . active ] : activeTab === id ,
102+ [ styles . dark ] : darkMode ,
103+ } ) }
82104 onClick = { ( ) => setActiveTab ( id ) }
83105 aria-selected = { activeTab === id }
84106 >
85- < div className = "tab-icon" >
107+ < div className = { styles . tabIcon } >
86108 { customIconSrc ? (
87- < img src = { customIconSrc } alt = { `${ label } icon` } className = "tab-icon" />
109+ < img src = { customIconSrc } alt = { `${ label } icon` } className = { styles . tabIcon } />
88110 ) : (
89111 < FontAwesomeIcon
90112 icon = { icon }
91113 style = { { width : '100%' , height : '100%' , color : getIconColor ( id ) } }
92114 />
93115 ) }
94116 </ div >
95- < div className = "tab-label" > { label } </ div >
117+ < div className = { styles . tabLabel } > { label } </ div >
96118 </ NavLink >
97119 </ NavItem >
98120 ) ) }
@@ -101,12 +123,26 @@ function Announcements({ title, email: initialEmail }) {
101123
102124 < div style = { { backgroundColor : darkMode ? '#14233a' : '#fff' , padding : '1rem' } } >
103125 < TabContent activeTab = { activeTab } >
104- { /* Email tab now uses the extracted component */ }
105126 < TabPane tabId = "email" >
106127 < EmailPanel title = { title } initialEmail = { initialEmail } />
107128 </ TabPane >
108129
109- { /* Platforms stay the same */ }
130+ < TabPane tabId = "video" >
131+ < SocialMediaComposer platform = "video" />
132+ </ TabPane >
133+
134+ < TabPane tabId = "article" >
135+ < SocialMediaComposer platform = "article" />
136+ </ TabPane >
137+
138+ < TabPane tabId = "photo" >
139+ < SocialMediaComposer platform = "photo" />
140+ </ TabPane >
141+
142+ < TabPane tabId = "weeklyreport" >
143+ < SocialMediaComposer platform = "weeklyreport" />
144+ </ TabPane >
145+
110146 { [
111147 'x' ,
112148 'facebook' ,
0 commit comments