File tree Expand file tree Collapse file tree
assets/src/dashboard/parts/connected/dashboard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,13 +172,15 @@ const Dashboard = () => {
172172
173173 // Fallback for missing data
174174 if ( undefined === value ) {
175- value = 'saved_size' === type ?
176- Math . floor ( Math . random ( ) * 2500000 ) + 500000 : // Mock KB
177- 'traffic' === type ?
178- Math . floor ( Math . random ( ) * 2500 ) + 500 : // Mock MB
179- 'offloaded_images' === type ?
180- Math . floor ( Math . random ( ) * 500 ) + 50 : // Mock images count
181- Math . floor ( Math . random ( ) * 40 ) + 10 ; // Mock Percentage
175+ if ( 'saved_size' === type ) {
176+ value = Math . floor ( Math . random ( ) * 2500000 ) + 500000 ; // Mock KB
177+ } else if ( 'traffic' === type ) {
178+ value = Math . floor ( Math . random ( ) * 2500 ) + 500 ; // Mock MB
179+ } else if ( 'offloaded_images' === type ) {
180+ value = Math . floor ( Math . random ( ) * 500 ) + 50 ; // Mock images count
181+ } else {
182+ value = Math . floor ( Math . random ( ) * 40 ) + 10 ; // Mock Percentage
183+ }
182184 }
183185
184186 switch ( type ) {
You can’t perform that action at this time.
0 commit comments