@@ -13,15 +13,25 @@ import {
1313} from "../../lib/emergencyNumbers" ;
1414import { mockNews } from "@/lib/news" ;
1515
16- const heroSlides = [
16+ type HeroSlide = {
17+ title : string ;
18+ description : string ;
19+ primaryCtaLabel : string ;
20+ primaryCtaHref : string ;
21+ secondaryCtaLabel ?: string ;
22+ secondaryCtaHref ?: string ;
23+ isMainSlide ?: boolean ;
24+ } ;
25+
26+ const heroSlides : HeroSlide [ ] = [
1727 {
1828 title : "We care for you and every community around you" ,
1929 description :
2030 "NEPH is a social responsibility initiative focused on preparedness, solidarity, and faster local coordination before and during emergencies." ,
21- primaryCtaLabel : "Open News " ,
22- primaryCtaHref : "/news " ,
23- secondaryCtaLabel : "Emergency Numbers " ,
24- secondaryCtaHref : "/emergency-numbers " ,
31+ primaryCtaLabel : "Who We Are " ,
32+ primaryCtaHref : "/who-we-are " ,
33+ secondaryCtaLabel : "About Us " ,
34+ secondaryCtaHref : "/about-project " ,
2535 isMainSlide : true ,
2636 } ,
2737 {
@@ -36,20 +46,16 @@ const heroSlides = [
3646 {
3747 title : "Report incidents from the mobile app" ,
3848 description :
39- "Use the NEPH mobile app to quickly submit emergency requests and stay connected with neighborhood responders." ,
40- primaryCtaLabel : "Open News" ,
41- primaryCtaHref : "/news" ,
42- secondaryCtaLabel : "View Announcements" ,
43- secondaryCtaHref : "/news" ,
49+ "Emergency requests are submitted through the NEPH mobile app so responders can receive faster, location-aware updates during critical moments." ,
50+ primaryCtaLabel : "Download Mobile App" ,
51+ primaryCtaHref : "#" ,
4452 } ,
4553 {
4654 title : "Track local updates in one place" ,
4755 description :
4856 "Follow announcements, preparedness updates, and community coordination news from a single dashboard." ,
4957 primaryCtaLabel : "Browse News" ,
5058 primaryCtaHref : "/news" ,
51- secondaryCtaLabel : "View Announcements" ,
52- secondaryCtaHref : "/news" ,
5359 } ,
5460] ;
5561
@@ -89,12 +95,14 @@ export default function HomePage() {
8995 { currentSlide . primaryCtaLabel }
9096 </ PrimaryButton >
9197
92- < SecondaryButton
93- className = "home-hero-secondary-action"
94- onClick = { ( ) => router . push ( currentSlide . secondaryCtaHref ) }
95- >
96- { currentSlide . secondaryCtaLabel }
97- </ SecondaryButton >
98+ { currentSlide . secondaryCtaHref && currentSlide . secondaryCtaLabel ? (
99+ < SecondaryButton
100+ className = "home-hero-secondary-action"
101+ onClick = { ( ) => router . push ( currentSlide . secondaryCtaHref ! ) }
102+ >
103+ { currentSlide . secondaryCtaLabel }
104+ </ SecondaryButton >
105+ ) : null }
98106 </ div >
99107 </ div >
100108
0 commit comments