@@ -42,6 +42,16 @@ function formatDate(dateStr: string): string {
4242 } ) ;
4343}
4444
45+ /**
46+ * Clean name: remove @ and everything after it
47+ */
48+ function cleanName ( name : string ) : string {
49+ if ( name . includes ( "@" ) ) {
50+ return name . split ( "@" ) [ 0 ] . trim ( ) ;
51+ }
52+ return name ;
53+ }
54+
4555function getStatusColor ( status : Member [ "status" ] ) : string {
4656 switch ( status ) {
4757 case "active" :
@@ -92,7 +102,7 @@ function getMonthOptions(): Array<{ value: string; label: string }> {
92102 return options ;
93103}
94104
95- export default function MemberSubscriptionsPage ( ) {
105+ export default function MemberListPage ( ) {
96106 const [ data , setData ] = useState < MembersFile | null > ( null ) ;
97107 const [ loading , setLoading ] = useState ( true ) ;
98108 const [ error , setError ] = useState < string | null > ( null ) ;
@@ -120,6 +130,10 @@ export default function MemberSubscriptionsPage() {
120130 return res . json ( ) ;
121131 } )
122132 . then ( ( data : MembersFile ) => {
133+ // Sort members alphabetically by firstName
134+ data . members . sort ( ( a , b ) =>
135+ cleanName ( a . firstName ) . localeCompare ( cleanName ( b . firstName ) )
136+ ) ;
123137 setData ( data ) ;
124138 setLoading ( false ) ;
125139 } )
@@ -143,7 +157,7 @@ export default function MemberSubscriptionsPage() {
143157 </ Link >
144158 < div className = "flex flex-col md:flex-row md:items-center md:justify-between gap-4" >
145159 < div >
146- < h1 className = "text-3xl font-bold" > Membership Subscriptions </ h1 >
160+ < h1 className = "text-3xl font-bold" > Active Commoners </ h1 >
147161 < p className = "text-muted-foreground mt-1" >
148162 Supporting members who contribute financially to the Commons Hub
149163 </ p >
@@ -163,6 +177,36 @@ export default function MemberSubscriptionsPage() {
163177 </ div >
164178 </ div >
165179
180+ { /* Join CTA - at the top */ }
181+ < Card className = "mb-8 bg-gradient-to-r from-primary/10 to-primary/5" >
182+ < CardHeader >
183+ < CardTitle > Become a Member</ CardTitle >
184+ < CardDescription >
185+ Support the Commons Hub Brussels and get access to member benefits
186+ </ CardDescription >
187+ </ CardHeader >
188+ < CardContent >
189+ < div className = "flex flex-wrap gap-4" >
190+ < a
191+ href = "https://buy.stripe.com/00g9C7dFH8EI07eaEJ"
192+ target = "_blank"
193+ rel = "noopener noreferrer"
194+ className = "inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90"
195+ >
196+ Monthly — €10/month
197+ </ a >
198+ < a
199+ href = "https://buy.stripe.com/5kA4hNbxz4os2fm3cl"
200+ target = "_blank"
201+ rel = "noopener noreferrer"
202+ className = "inline-flex items-center justify-center rounded-md border border-primary bg-background px-4 py-2 text-sm font-medium text-primary shadow-sm hover:bg-primary/10"
203+ >
204+ Yearly — €100/year (save €20)
205+ </ a >
206+ </ div >
207+ </ CardContent >
208+ </ Card >
209+
166210 { loading ? (
167211 < div className = "flex items-center justify-center min-h-[400px]" >
168212 < Loader2 className = "h-8 w-8 animate-spin text-muted-foreground" />
@@ -262,7 +306,7 @@ export default function MemberSubscriptionsPage() {
262306 < TableRow key = { member . id } >
263307 < TableCell >
264308 < div className = "flex flex-col" >
265- < span className = "font-medium" > { member . firstName } </ span >
309+ < span className = "font-medium" > { cleanName ( member . firstName ) } </ span >
266310 { member . accounts . discord && (
267311 < span className = "text-xs text-muted-foreground" >
268312 @{ member . accounts . discord }
@@ -317,36 +361,6 @@ export default function MemberSubscriptionsPage() {
317361 </ CardContent >
318362 </ Card >
319363
320- { /* Join CTA */ }
321- < Card className = "mt-8 bg-gradient-to-r from-primary/10 to-primary/5" >
322- < CardHeader >
323- < CardTitle > Become a Member</ CardTitle >
324- < CardDescription >
325- Support the Commons Hub Brussels and get access to member benefits
326- </ CardDescription >
327- </ CardHeader >
328- < CardContent >
329- < div className = "flex flex-wrap gap-4" >
330- < a
331- href = "https://buy.stripe.com/00g9C7dFH8EI07eaEJ"
332- target = "_blank"
333- rel = "noopener noreferrer"
334- className = "inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow hover:bg-primary/90"
335- >
336- Monthly — €10/month
337- </ a >
338- < a
339- href = "https://buy.stripe.com/5kA4hNbxz4os2fm3cl"
340- target = "_blank"
341- rel = "noopener noreferrer"
342- className = "inline-flex items-center justify-center rounded-md border border-primary bg-background px-4 py-2 text-sm font-medium text-primary shadow-sm hover:bg-primary/10"
343- >
344- Yearly — €100/year (save €20)
345- </ a >
346- </ div >
347- </ CardContent >
348- </ Card >
349-
350364 { /* Data info */ }
351365 < p className = "text-xs text-muted-foreground text-center mt-8" >
352366 Data generated: { new Date ( data . generatedAt ) . toLocaleString ( ) }
0 commit comments