File tree Expand file tree Collapse file tree 4 files changed +22
-14
lines changed Expand file tree Collapse file tree 4 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -175,23 +175,29 @@ const Indicator = ({
175175 if ( ! isNaN ( number ) ) {
176176 return number ;
177177 }
178- if ( indicator . raw_data_col . length > 3 ) {
178+ const cleanedData = indicator . raw_data_col . replace ( / ^ [ " ' ] + | [ " ' ] + $ / g, '' ) . trim ( ) ;
179+
180+ if ( cleanedData . length > 9 ) {
181+ // Find the first word
182+ const firstWord = cleanedData . split ( ' ' ) [ 0 ] ;
183+
179184 return (
180185 < span
181186 onMouseEnter = { ( ) => setIsHovered ( true ) }
182187 onMouseLeave = { ( ) => setIsHovered ( false ) }
183188 >
184- { indicator . raw_data_col . substring ( 0 , 3 ) } ...
189+ { firstWord } ...
185190 </ span >
186191 ) ;
187192 } else {
188- return indicator . raw_data_col ;
193+ return cleanedData ;
189194 }
190195 } else {
191196 return hasNoData ? "Data unavailable" : disp_val ;
192197 }
193198 } ;
194199
200+
195201 const getWidthClass = ( ) => {
196202 if ( indicator . raw_data_col . length <= 7 ) {
197203 return "w-auto" ;
@@ -211,7 +217,7 @@ const Indicator = ({
211217 { isHovered && (
212218 < div className = { `absolute right-0 text-center bottom-full mb-2 bg-white shadow-lg border border-gray-200 z-50
213219 ${ getWidthClass ( ) } p-2` } >
214- { indicator . raw_data_col }
220+ { indicator . raw_data_col . replace ( / ^ [ " ' ] + | [ " ' ] + $ / g , '' ) . trim ( ) }
215221 </ div >
216222 ) }
217223 </ span >
Original file line number Diff line number Diff line change @@ -191,17 +191,22 @@ const Indicator = ({
191191 if ( ! isNaN ( number ) ) {
192192 return number ;
193193 }
194- if ( indicator . raw_data_col . length > 3 ) {
194+ const cleanedData = indicator . raw_data_col . replace ( / ^ [ " ' ] + | [ " ' ] + $ / g, '' ) . trim ( ) ;
195+
196+ if ( cleanedData . length > 9 ) {
197+ // Find the first word
198+ const firstWord = cleanedData . split ( ' ' ) [ 0 ] ;
199+
195200 return (
196201 < span
197202 onMouseEnter = { ( ) => setIsHovered ( true ) }
198203 onMouseLeave = { ( ) => setIsHovered ( false ) }
199204 >
200- { indicator . raw_data_col . substring ( 0 , 3 ) } ...
205+ { firstWord } ...
201206 </ span >
202207 ) ;
203208 } else {
204- return indicator . raw_data_col ;
209+ return cleanedData ;
205210 }
206211 } else {
207212 return hasNoData ? "Data unavailable" : disp_val ;
@@ -229,7 +234,7 @@ const Indicator = ({
229234 className = { `absolute right-0 text-center bottom-full mb-2 bg-white shadow-lg border border-gray-200 z-50
230235 ${ getWidthClass ( ) } p-2` }
231236 >
232- { indicator . raw_data_col }
237+ { indicator . raw_data_col . replace ( / ^ [ " ' ] + | [ " ' ] + $ / g , '' ) . trim ( ) }
233238 </ div >
234239 ) }
235240 </ span >
Original file line number Diff line number Diff line change @@ -573,12 +573,9 @@ const Scrollytelling = ({ country }: { country: any }) => {
573573 ) }
574574
575575 { currentStepIndex > 1 && currentStepIndex < 5 && (
576- < >
577- < SolarSystem
578- isExpandedDefault = { currentStepIndex === 4 }
579- isHighlightingPillars = { currentStepIndex === 3 }
580- />
581- </ >
576+ < div className = "SolarSystem w-[min(70vh,100%)] pointer-events-[all]" >
577+ < img src = "/DTF.gif" alt = "DTF Animation" />
578+ </ div >
582579 ) }
583580
584581 { currentStepIndex > 4 && currentStepIndex < 7 && (
You can’t perform that action at this time.
0 commit comments