File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,6 +52,13 @@ const topNavBarMenu = ({ t }: typeof i18n): MenuItem[] => [
5252 { href : '/policy' , title : t ( 'policy' ) } ,
5353 ] ,
5454 } ,
55+ {
56+ title : t ( 'china_public_interest_map' ) ,
57+ subs : [
58+ { href : '/organization' , title : t ( 'china_public_interest_map' ) } ,
59+ { href : '/organization/landscape' , title : t ( 'china_public_interest_landscape' ) } ,
60+ ] ,
61+ } ,
5562] ;
5663
5764export interface MainNavigatorProps {
Original file line number Diff line number Diff line change @@ -36,11 +36,7 @@ const strapiClient = new HTTPClient({
3636
3737export class OrganizationModel extends StrapiListModel < Organization > {
3838 baseURI = '/organizations' ;
39-
40- constructor ( ) {
41- super ( ) ;
42- this . client = strapiClient ;
43- }
39+ client = strapiClient ;
4440
4541 @observable
4642 accessor tagMap : Record < string , Organization [ ] > = { } ;
@@ -85,7 +81,9 @@ export class OrganizationStatisticModel {
8581 try {
8682 // This would need to be adapted based on the actual Strapi API structure
8783 const response = await this . client . get ( `${ this . collection } ` ) ;
88- return response . body ?. data || [ ] ;
84+ // Handle potential different response structures
85+ const data = response . body ?. data || response . body || [ ] ;
86+ return Array . isArray ( data ) ? data : [ ] ;
8987 } catch ( error ) {
9088 console . error ( `Failed to fetch statistics for ${ this . collection } :` , error ) ;
9189 return [ ] ;
You can’t perform that action at this time.
0 commit comments