File tree Expand file tree Collapse file tree
frontend/src/components/partners Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import PartnersProgresBar from './partnersProgresBar';
66import messages from './messages' ;
77import { OHSOME_STATS_API_URL } from '../../config' ;
88
9- export const Activity = ( { partner } ) => {
9+ export const Activity = ( { partner } : Object ) => {
1010 const [ data , setData ] = useState ( null ) ;
1111
1212 const fetchData = async ( ) => {
@@ -17,10 +17,12 @@ export const Activity = ({ partner }) => {
1717 }
1818 primaryHashtag = primaryHashtag . toLowerCase ( ) ;
1919
20- const secondaryHashtags = partner . secondary_hashtag
21- ?. split ( ',' )
22- ?. map ( ( tag ) => tag . trim ( ) . replace ( '#' , '' ) . toLowerCase ( ) )
23- ?. join ( ',' ) ;
20+ const secondaryHashtags =
21+ partner . secondary_hashtag
22+ ?. split ( ',' )
23+ ?. map ( ( tag ) => tag . trim ( ) . replace ( '#' , '' ) . toLowerCase ( ) )
24+ ?. join ( ',' ) || '' ;
25+
2426 const response = await fetch (
2527 OHSOME_STATS_API_URL + `/stats/hashtags/${ primaryHashtag } ,${ secondaryHashtags } ` ,
2628 ) ;
You can’t perform that action at this time.
0 commit comments