import React, { useEffect, useState, useContext, lazy, Suspense } from 'react'; import { createRoot } from 'react-dom/client'; import { Menu, X, ArrowRight, ArrowLeft, ChevronLeft, ChevronRight, Scale, Target, Eye, Download, Users, Landmark, Heart, CalendarDays, CheckCircle2, MapPin, Mail, Phone, ExternalLink, Play, BookOpen, FileText, Headphones, Banknote, HandHeart, UserRound, Vote, ShieldCheck, LoaderCircle, Newspaper, Building2, IdCard, RefreshCw, Info, Megaphone, Clock3, Search, Smartphone, Home, Images, Sun, Moon, Globe2, Music2 } from 'lucide-react'; import './styles.css'; import './display-mode.css'; import './join-dark.css'; import './join-widget.css'; import './join-polish.css'; import './join-bars.css'; import './join-date.css'; import './leader.css'; import './member-counter.css'; const BackOffice=lazy(()=>import('./BackOffice')); import CampaignAds from './ManagedAds'; import RegistrationGuide from './RegistrationGuide'; import { ContentContext, useEditable, normalizeContent, safeLink } from './site-content'; import { publicApi } from './api'; import ContactForm from './ContactForm'; import InstallAppPage,{InstallPrompt as PWAInstall,PrivacyPage} from './InstallApp'; import {isNativeAndroid} from './android-app'; import bundledContent from '../data/site-content.json'; const JOIN_PAGE_URL = '/join'; const SITE_ROUTES=['/','/updates','/about','/party-leader','/civic-hub','/gallery','/resources','/donate','/contact','/join','/download','/privacy','/backoffice']; const nav = [['Home','/'],['Updates','/updates'],['About Us','/about'],['Party Leader','/party-leader'],['Civic Hub','/civic-hub'],['Gallery','/gallery'],['Resources','/resources'],['Donate','/donate'],['Contact','/contact']]; const slides = [ { image: '/img/tep-hero-banner.png', eyebrow: 'A fair future for every Kenyan', title: 'Welcome to The Equitable Party', subtitle: 'Justice. Opportunity. Dignity.', cta: 'Join TEP' }, { image: '/img/tep-hero-banner.png', eyebrow: 'One movement, one purpose', title: 'Together, we can build a more equitable Kenya', subtitle: 'Every voice matters.', cta: 'Join the movement' }, { image: '/img/tep-hero-banner.png', eyebrow: 'People-powered leadership', title: 'Communities at the heart of progress', subtitle: 'Opportunity for every Kenyan.', cta: 'Become a member' }, { image: '/img/tep-hero-banner.png', eyebrow: 'Chama cha kusawazisha', title: 'A movement built by the people', subtitle: 'Tusawazishe', cta: 'Jiunge na TEP' }, { image: '/img/tep-hero-banner.png', eyebrow: 'Leadership that listens', title: 'Your voice can shape our shared future', subtitle: 'Stand with us for a fairer Kenya.', cta: 'Join TEP' } ]; const resources = [ ['Elections Act, 2011','Official revised electoral law hosted by IEBC','https://www.iebc.or.ke/uploads/resources/kqI5cmgeyB.pdf',Scale], ['Political Parties Act','Political Parties Act No. 11 of 2011','https://www.iebc.or.ke/uploads/resources/n7k15EbFt4.pdf',Landmark], ['IEBC Act, 2011','Independent Electoral and Boundaries Commission Act','https://www.iebc.or.ke/uploads/resources/8Z5fmROhVD.pdf',BookOpen], ['Election Regulations','General, voter-registration and party-primary regulations','https://www.iebc.or.ke/uploads/resources/902SFZiDqt.pdf',FileText], ['Register of Voters Audit','Official independent audit and voter-registration guidance','https://www.iebc.or.ke/uploads/resources/0CpUTC8Q5a.pdf',Users], ['Post-Election Evaluation','IEBC evaluation of electoral operations and reforms','https://www.iebc.or.ke/uploads/resources/V9UUoGqVBK.pdf',ShieldCheck] ]; function App({managed}){const editable=useEditable(); const [menu,setMenu]=useState(false); const [slide,setSlide]=useState(0); const [sent,setSent]=useState(false); const [lightbox,setLightbox]=useState(null); const [darkMode,setDarkMode]=useState(()=>localStorage.getItem('tep-display-mode')==='dark'); const activeSlides=(managed?.heroes||slides).filter(item=>item.active!==false); const route=window.location.pathname.replace(/\/$/,'')||'/'; useEffect(()=>{ if(!activeSlides.length)return;setSlide(s=>s%activeSlides.length);const t=setInterval(()=>setSlide(s=>(s+1)%activeSlides.length),6500); return()=>clearInterval(t)},[activeSlides.length]); useEffect(()=>{window.scrollTo(0,0)},[route]); useEffect(()=>{const titles={'/':'The Equitable Party Kenya | TEP','/updates':'Party Updates | The Equitable Party','/about':'About The Equitable Party | TEP Kenya','/party-leader':'Edwin Sifuna | Party Leader | TEP','/civic-hub':'Civic Hub and IEBC Information | TEP','/gallery':'Gallery | The Equitable Party','/resources':'Electoral Resources | TEP Kenya','/donate':'Support The Equitable Party','/contact':'Contact The Equitable Party'};document.title=titles[route]||'The Equitable Party Kenya | TEP'},[route]); useEffect(()=>{document.body.classList.toggle('site-dark',darkMode);localStorage.setItem('tep-display-mode',darkMode?'dark':'light')},[darkMode]); return <> {route==='/'&&}
{editable("21edff5a3937","Democracy starts with participation.")}{editable("567b46063f72","Find voter registration guidance ")}
{editable("0870718880b6","The Equitable Party")}{editable("5b3e9c9a34ad","Tusawazishe")} {!isNativeAndroid()&&Download APK}
{route==='/join'&&} {route==='/'&&activeSlides.length>0&&
{activeSlides.map((s,i)=>
)}
{activeSlides[slide]?.eyebrow}

{activeSlides[slide]?.title}

{activeSlides[slide]?.subtitle}

{editable("b6ba29808492","Equity for all")}{editable("5cf76c85bd04","Creating opportunity in every community")}
} {route==='/'&&<>
{editable("ab68952e97ca","The Equitable Party")}

{editable("8c6994ca825b","Politics that puts people and communities first.")}

{editable("0e98537a2b67","We are organising across Kenya for fair access to opportunity, accountable leadership, and an economy that works for every citizen.")}

{editable("22f21d8ead98","Learn about TEP ")}
{editable("ee72c80e1586","In focus")}

{editable("3e3bb1871a09","Stay informed. Stay involved.")}

{editable("3fc09525bfe9","Party activity and official electoral information in one place.")}

} {route==='/download'&&} {route==='/privacy'&&} {route==='/updates'&&<>
{editable("f712dda70eab","From the movement")}

{editable("7fd691158de0","What’s happening at TEP")}

{editable("2f85ba17d6e9","Official announcements, community activity and opportunities to take part in building a more equitable Kenya.")}

{editable("a7ac29e5caad","Featured announcement")}{editable("809c652968ec","05 October 2026 · Party notice")}

{editable("1d5773e1a7a1","Party nomination updates")}

{editable("e076b40a104c","Important information and updates regarding The Equitable Party nomination process.")}

{editable("3b6847c0f656","Read the announcement ")}
{editable("2aeb6f7a3e30","Movement")}

{editable("167cbe7b1bf0","Join the conversation")}

{editable("d5203fb76f7b","Connect with local organisers and stay close to party activity in your community.")}

{editable("14eb88c98ecc","Get involved ")}
{editable("70bf45617542","Participation")}

{editable("7d065f5f9305","Upcoming activities")}

{editable("b6385fb4b58a","Watch this space for meetings, civic forums and grassroots organising updates.")}

{editable("eb4bf62ab1d5","Contact the team ")}
{editable("c8e74bbe8b24","Public information")}

{editable("8abfc8ff962d","Stay informed")}

{editable("9fbf90c13cc0","Explore civic resources and official electoral information before you take part.")}

{editable("8164a7f6bea9","Visit civic hub ")}
} {route==='/about'&&<>
{editable("f1dbaf579897","About TEP")}

{editable("4df9049c810f","Creating opportunity for every Kenyan.")}

{editable("9620d36bec9b","The Equitable Party (TEP) is a Kenyan political party formed in accordance with the Political Parties Act 2011. We are building a society where every person can access the same opportunities, regardless of their background or circumstances.")}

{editable("21930b54c0ab","We believe economic growth must benefit everyone, communities should help shape their own future, and our environment must be protected for generations to come.")}

{editable("6750b9095ea7"," Watch our story")}
{editable("68101b6e8163","The
{editable("87262ef0938f","“A level playing field for every Kenyan.”")}
{editable("cacbf54fae37","Building a fair, just and sustainable society that creates a better future for everyone.")}{editable("aac285f7fb06","Enable economic and social justice through equitable distribution of national resources.")}{editable("28454c04eae2","An equitable, prosperous and modern nation where all citizens live in dignity.")}
{editable("5a3f34c52003","The Equitable Party")}

{editable("bfe23e16302b","Fairness is our foundation. Participation is our power.")}

{editable("7b9b81620c81","TEP brings people together around a simple promise: every Kenyan deserves dignity, a voice in decisions that affect them, and a fair chance to build a secure future.")}

01

{editable("7d0929984f32","Equality")}

{editable("15f79568f96f","Close the gaps that keep communities from opportunity.")}

02

{editable("dc1634dee38e","Justice")}

{editable("5ef1d557725e","Stand with people whose voices are too often ignored.")}

03

{editable("412ce0d9648d","Opportunity")}

{editable("048cfc6c405a","Build an economy and society that leaves no one behind.")}

{editable("594267df2665","Our impact")}

{editable("49ad58986581","Building stronger communities, together.")}

} {route==='/party-leader'&&} {route==='/civic-hub'&&} {route==='/gallery'&&} {route==='/resources'&&<>
{editable("8f75482f611c","Official document library")}

{editable("a4f9a5a2883a","Direct IEBC downloads")}

{editable("6ffccc68034d","Every document below links directly to a PDF hosted by the Independent Electoral and Boundaries Commission.")}

{(managed.resources||[]).filter(item=>item.active!==false).map(({title,description:desc,url:href})=>

{title}

{desc}

{editable("2a40d73e597c","PDF · IEBC official source")}
)}
{editable("9c82a054a260","Verified official sources")}

{editable("0f2828428958","These files are served directly from the IEBC website. Selecting a document opens the official PDF download URL.")}

} {route==='/donate'&&<>} {route==='/contact'&&<>

{editable("af699dd3b4c8","Our team will get back to you as soon as possible.")}

{editable("38d27466acc8","First Floor, REPEN Complex")}
{editable("f0b972db0872","Syokimau–Katani Road, Nairobi")}
{editable("4e932dad1afc","info@theequitableparty.org")}+254 729 229 974
{editable("12f4501442a6","Follow our pages")}
{(managed?.socials||[]).filter(item=>item.active!==false&&item.url&&!/website/i.test(item.platform||'')).map(item=>{item.platform})}
}
{lightbox&&
setLightbox(null)} role="dialog" aria-modal="true">{lightbox.alt}/

{lightbox.alt}

}
Install Android APKPrivacy policy
; } function BrandIcon({name}){const editable=useEditable();const value=(name||'').toLowerCase();if(value.includes('facebook'))return ;if(value==='x'||value.includes('twitter'))return ;if(value.includes('youtube'))return ;if(value.includes('instagram'))return ;if(value.includes('tiktok'))return ;return } function SocialLinks({socials=[]}){const editable=useEditable();const [open,setOpen]=useState(false),[iconIndex,setIconIndex]=useState(0);const links=socials.filter(item=>item.active!==false&&item.url&&!/website/i.test(item.platform||''));useEffect(()=>{if(!links.length||open)return;const timer=setInterval(()=>setIconIndex(index=>(index+1)%links.length),3000);return()=>clearInterval(timer)},[links.length,open]);if(!links.length)return null;const active=links[iconIndex]||links[0],brand=(active.platform||'social').toLowerCase().replace(/[^a-z]/g,'-');return
{editable("99a40594900e","Connect with TEP")}

{editable("dcfabb52b8c0","Follow the movement")}

} function Value({icon:Icon,n,title,children}){const editable=useEditable();return
{n}

{title}

{children}

} function Stat({icon:Icon,number,text}){const editable=useEditable();return
{number}{text}
} function Contact({icon:Icon,title,children}){const editable=useEditable();return
{title}

{children}

} function HomePath({icon:Icon,label,text,href}){const editable=useEditable();return

{label}

{text}

} function PageHero({kicker,title,text}){const editable=useEditable();return <>
{kicker}

{title}

{text}

{window.location.pathname.replace(/\/$/,'')==='/updates'&&}} function PartyLeaderPage(){const editable=useEditable();return <>
{editable("dd26a3a3ad57","Edwin
{editable("52290fead682","Party leader")}

{editable("6988433c921e","Edwin Sifuna")}

{editable("47ae1c08d66e","A public voice shaped by family, community and a commitment to justice.")}

{editable("6b5fb8e6c34b","Edwin Sifuna was born on 22 May 1982 in Kakamega County to working-class parents. His father was a civil servant with the former Municipal Council and his mother, a now-retired teacher from Moi Primary School in Bungoma. He has two brothers and two sisters, and family remains at the core of who he is.")}

{editable("7c89872b441b","Growing up, Sifuna witnessed the hardships that affect many Kenyans: inadequate resources, inequality based on where one comes from, limited economic opportunities and the oppression of people who could not stand up for themselves. These experiences sparked a lasting determination to do better, be better and become a voice that could not be ignored.")}

1982{editable("78eef5304517","Born in Kakamega County")}
2006{editable("652581eb1ffa","LL.B., University of Nairobi")}
2008{editable("6323a0a6e201","Admitted to the Roll of Advocates")}
{editable("706f8f128ca3","The journey")}

{editable("5311c7eae884","From education to public service.")}

{editable("ff301ded0a41","He began his formal education at Kakamega Township Primary School and later joined Musingu High School, where he obtained his Kenya Certificate of Secondary Education.")}

{editable("d450a3a96e66","He pursued a Bachelor of Laws degree from the University of Nairobi, graduating in 2006. He then completed a Post Graduate Diploma at the Kenya School of Law in 2007 and was admitted to the Roll of Advocates in 2008.")}

{editable("6ed3d776c0b2","Discover TEP's mission ")}
{editable("3b90fd84a1e9","Leadership with purpose")}

{editable("0a9fd06594f5","Building a party where every voice counts.")}

{editable("572c2f54dbef","The Equitable Party is focused on turning lived experience into fairer institutions, shared opportunity and practical change in every community.")}

{editable("7e66a7596368","Join the movement ")}
} function NominationNotice(){const editable=useEditable();const candidates=[['David Kipchumba Too','MCA – Chemundu/Kapngetuny','TEP-350843','Nandi'],['Simiyu Dan Tanganyika','MCA – Kabuchai/Chwele','TEP-351610','Bungoma'],['Edward Kiplimo Mengich','MCA – Metkei Ward','TEP-353979','Elgeyo Marakwet']];return
{editable("81501358a45b","THE EQUITABLE PARTY")}{editable("0df8248e8392","theequitableparty.site")}
{editable("780de43ca3b9","Official party notice")}
{editable("fd147fd6a0ac","Party nominations · Upcoming by-elections")}

{editable("1c043ce596ae","Party nominations for upcoming by-elections updates")}

{editable("e200561c9a9a","The Equitable Party (TEP) wishes to inform members of the public that, pursuant to the Political Parties Act (PPA) and our party’s nomination rules, the following candidates have been elected unopposed in their respective wards.")}

{editable("e0ea5e498d9a","Therefore, issuance of nomination certificates within the respective county offices will proceed within the stipulated dates ")}{editable("84f50f4a3ca0","(25th – 27th September, 2025).")}

{candidates.map(row=>{row.map((cell,i)=>)})}
{editable("ca3deee6e5a2","Name")}{editable("e12161f77346","Position/Ward")}{editable("eb9f394d3baf","Membership")}{editable("28dc25b0dc15","County")}
{cell}
} function CivicHub(){const editable=useEditable();return <>
{editable("214f7d663a41","Official electoral geography")}47{editable("e6e1494adbc0","Counties")}
{editable("1b95cc4f6d5e","Representation")}290{editable("6b6857281e43","Constituencies")}
{editable("7a6d899790d7","Local electoral areas")}1,450{editable("0424afc4fb50","County assembly wards")}
{editable("1ef9d63821b6","Registration centres")}{editable("e1618254e663","24K+")}{editable("da5800c1fd9a","Directory entries")}
{editable("a9cc74ab89d9","Voter registration")}

{editable("554e506f7f2c","Be ready to participate.")}

{editable("85bdc0809ee6","Continuous voter registration is an official IEBC service. Check your electoral area and find a centre below before travelling.")}

{editable("4dd33acb05fe","Eligible Kenyan citizens who are at least 18 years old can visit an official registration point with an original identification document.")}{editable("1c4bd6a4a7a9","IEBC states that office-based continuous registration is available at its 290 constituency offices, 57 Huduma Centres and the Customer Experience Centre at Anniversary Towers.")}{editable("499bbd44dce3","For a transfer, a registered voter must appear in person before the registration officer in the constituency to which they want to transfer and submit biometrics afresh.")}
{editable("d6dd39b3f0fa","Official updates")}

{editable("5ef5fe8ce622","From the IEBC information desk")}

{editable("dcad516ea0d3","Recent areas of public information. Follow the links to read and verify details on the official website.")}

{editable("fcfeafa40074"," Information reviewed 4 October 2026 · Source: IEBC ")}{editable("693e41dfc19c","View all official news ")}
} function CivicCard({icon:Icon,n,title,children}){const editable=useEditable();return
{n}

{title}

{children}

} function OfficialNews({date,title}){const editable=useEditable();return {date}

{title}

{editable("49139e97f951","Independent Electoral and Boundaries Commission")}

{editable("550cf96400bd","Read at IEBC ")}
} function RegistrationLocator(){const editable=useEditable(); const [data,setData]=useState(null),[loading,setLoading]=useState(true),[geo,setGeo]=useState({county:'',constituency:'',ward:''}),[query,setQuery]=useState(''); useEffect(()=>{fetch('/data/iebc-regions.json').then(r=>r.json()).then(setData).finally(()=>setLoading(false))},[]); const counties=data?.counties||[],county=counties.find(x=>x.id===geo.county),constituency=county?.constituencies.find(x=>x.id===geo.constituency),ward=constituency?.wards.find(x=>x.id===geo.ward); const stations=(ward?.stations||[]).filter(x=>x.toLowerCase().includes(query.toLowerCase())); const change=(key,value)=>setGeo(g=>key==='county'?{county:value,constituency:'',ward:''}:key==='constituency'?{...g,constituency:value,ward:''}:{...g,ward:value}); return
{editable("45ae97775352","On-site electoral directory")}

{editable("e61a21c56853","Find your registration centre")}

{editable("a39cad6ebc47","Select your registered electoral area to view available centres.")}

{editable("0187d12797c8"," IEBC data")}
{loading?
{editable("fcf038809705"," Loading nationwide directory…")}
:<>
{ward&&
{ward.name}{stations.length} registration {stations.length===1?'centre':'centres'} found
{stations.map((station,i)=>
{String(i+1).padStart(2,'0')}{station}
)}{!stations.length&&

{editable("49f95ca422d2","No centres match your search.")}

}
} {!ward&&

{editable("7dfb30d87d93","Choose a county, constituency and ward to display registration centres.")}

}}
} function Gallery({onView,managedGallery=[]}){const editable=useEditable(); const defaultPhotos=[ {src:'/img/gallery/tep-event-01.png',alt:'Guests at The Equitable Party gathering',wide:true}, {src:'/img/gallery/how-to-join-tep.png',alt:'How to join TEP using *509#'}, {src:'/img/gallery/tep-event-02.png',alt:'A moment from the TEP gathering'}, {src:'/img/gallery/tep-event-03.png',alt:'Members attending the party event'}, {src:'/img/gallery/tep-event-04.png',alt:'Community participation at the gathering'}, {src:'/img/gallery/tep-event-05.png',alt:'Leaders and guests sharing a light moment',wide:true}, {src:'/img/gallery/tep-event-06.png',alt:'Party supporters at the event'}, {src:'/img/gallery/tep-event-07.png',alt:'The Equitable Party community'}, {src:'/img/gallery/tep-event-08.png',alt:'Members gathered for the occasion'}, {src:'/img/gallery/tep-event-09.png',alt:'A shared moment among attendees'}, {src:'/img/gallery/tep-event-10.png',alt:'Guests celebrating together',wide:true}, {src:'/img/gallery/tep-event-11.png',alt:'Addressing members at the gathering'}, {src:'/img/gallery/tep-event-12.png',alt:'Voices from the community'}, {src:'/img/gallery/tep-event-13.png',alt:'Party members in attendance'}, {src:'/img/gallery/tep-event-14.png',alt:'Together for an equitable Kenya'} ], photos=managedGallery.filter(item=>item.active!==false).map((item,i)=>({src:item.url,alt:item.caption||`TEP gallery image ${i+1}`,wide:i%7===0})); return <>
{editable("d976c1701088","Photo stories")}

{editable("9091c613a18d","From across the movement")}

{editable("fa709313e088","Explore campaign moments, public information and community engagement from TEP.")}

{photos.map(photo=>)}
{editable("707775d4e196","From social media")}

{editable("6c6a3ae8a434","Public conversation")}

{editable("bdae2baee6f3","Follow political and civic conversations shared publicly on Facebook.")}

{editable("0f07db6e1a41","Facebook post")}{editable("316099ff0763","Embedded from its original public source")}
} function FacebookMark(){const editable=useEditable();return {editable("7bfd2bf1d23f","f")}} function MemberCounter(){const editable=useEditable();return } function MobileBottomNav(){const editable=useEditable();const managed=useContext(ContentContext);const native=isNativeAndroid();const route=window.location.pathname.replace(/\/$/,'')||'/';const items=[['/party-leader','Party Leader',UserRound],['/updates','Updates',Newspaper],['/gallery','Gallery',Images],['/','Home',Home],['/donate','Donate',Banknote],[JOIN_PAGE_URL,'Join',Phone],['app',native?'App Update':'APK',native?RefreshCw:Download]];return } function Root(){const editable=useEditable(); const requested=window.location.pathname.replace(/\/$/,'')||'/'; if(!SITE_ROUTES.includes(requested))window.history.replaceState(null,'','/'); const route=window.location.pathname.replace(/\/$/,'')||'/'; const [managed,setManaged]=useState(()=>normalizeContent()); useEffect(()=>{ if(route==='/backoffice')return; let cancelled=false; const sync=async()=>{try{const next=normalizeContent(await publicApi('/api/public/content'));if(cancelled)return;setManaged(next);const root=document.documentElement;for(const [key,value] of Object.entries({green:next.theme.primary,dark:next.theme.dark,gold:next.theme.accent,cream:next.theme.background}))root.style.setProperty('--'+key,value)}catch{/* Keep the bundled site available when the API is offline. */}}; const deviceId=localStorage.getItem('tep-device-id')||crypto.randomUUID();localStorage.setItem('tep-device-id',deviceId); const heartbeat=()=>publicApi('/api/visit',{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({page:route,deviceId})}).catch(()=>{}); sync();heartbeat();const timer=setInterval(sync,15000),pulse=setInterval(heartbeat,30000); return()=>{cancelled=true;clearInterval(timer);clearInterval(pulse)}; },[route]); if(route==='/backoffice')return Loading your backoffice…}>; return {route!=='/join'&&<>} } function JoinPage({overlay=false}){ const [step,setStep]=useState(1), [data,setData]=useState(null), [loading,setLoading]=useState(true), [done,setDone]=useState(false), [personal,setPersonal]=useState({}), [submitting,setSubmitting]=useState(false), [submitError,setSubmitError]=useState(''); const [geo,setGeo]=useState({county:'',constituency:'',ward:'',station:''}); useEffect(()=>{fetch('/data/iebc-regions.json').then(r=>r.json()).then(setData).finally(()=>setLoading(false))},[]); const counties=data?.counties||[], county=counties.find(x=>x.id===geo.county), constituency=county?.constituencies.find(x=>x.id===geo.constituency), ward=constituency?.wards.find(x=>x.id===geo.ward); const change=(key,value)=>setGeo(g=>key==='county'?{county:value,constituency:'',ward:'',station:''}:key==='constituency'?{...g,constituency:value,ward:'',station:''}:key==='ward'?{...g,ward:value,station:''}:{...g,[key]:value}); return
The Equitable PartyTusawazishe Back to website
{done?

Welcome to the movement!

Your membership application has been captured. The TEP team will contact you after verification.

Return home
:<>
Step {step} of 3

{step===1?'Tell us about yourself':step===2?'Select your electoral area':'Review and declare'}

{step===1?'Enter your details as they appear on your national identification.':step===2?'Use your registered IEBC polling area.':'Confirm that the information provided is accurate.'}

{e.preventDefault();const formData=Object.fromEntries(new FormData(e.currentTarget));if(step<3){if(step===1)setPersonal(formData);setStep(step+1);return}setSubmitting(true);setSubmitError('');try{const response=await fetch('/api/members',{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({...personal,...formData,...geo,county:county?.name||geo.county,constituency:constituency?.name||geo.constituency,ward:ward?.name||geo.ward})});const result=await response.json().catch(()=>({}));if(!response.ok)throw new Error(result.error||'Unable to submit your membership application');setDone(true)}catch(error){setSubmitError(error.message)}finally{setSubmitting(false)}}}> {step===1&&
} {step===2&&
{loading?
Loading IEBC electoral areas…
:<>
Official IEBC directory · 47 counties · 290 constituencies · 1,450+ wards
}
} {step===3&&
Your selected electoral area{[ward?.name,constituency?.name,county?.name].filter(Boolean).join(', ')}{geo.station}

Your information will be used for party membership administration and handled in accordance with Kenya’s Data Protection Act.

} {submitError&&
{submitError}
}
{step>1&&}
}
} function formatBirthDate(value){const digits=value.replace(/\D/g,'').slice(0,8);return digits.replace(/^(\d{2})(\d)/,'$1/$2').replace(/^(\d{2}\/\d{2})(\d)/,'$1/$2')} function Step({active,complete,n,icon:Icon,text}){return
{complete?:}
Step {n}{text}
} createRoot(document.getElementById('root')).render();