@@ -75,14 +75,18 @@ function DashboardPage({
75
75
const currentMonth = date . getMonth ( ) + 1
76
76
const formattedMonth = currentMonth > 9 ? currentMonth : `0${ currentMonth } `
77
77
const yearMonth = `${ currentYear } ${ formattedMonth } `
78
- const currentMonthData = statData . find ( ( { month } ) => month . toString ( ) === yearMonth )
78
+ const currentMonthData = statData . find (
79
+ ( { month } ) => month . toString ( ) === yearMonth ,
80
+ )
79
81
80
82
const mau = currentMonthData ?. mau
81
- const token = currentMonthData ?. authz_code_access_token_count + currentMonthData ?. client_credentials_access_token_count
83
+ const token =
84
+ currentMonthData ?. authz_code_access_token_count +
85
+ currentMonthData ?. client_credentials_access_token_count
82
86
if ( mau ) {
83
87
setMauCount ( mau )
84
88
}
85
- if ( token ) {
89
+ if ( token ) {
86
90
setTokenCount ( token )
87
91
}
88
92
} , [ statData ] )
@@ -197,10 +201,7 @@ function DashboardPage({
197
201
const StatusCard = ( ) => {
198
202
return (
199
203
< Grid xs = { 12 } >
200
- < Paper
201
- className = { `${ classes . statusContainer } ml-20` }
202
- elevation = { 3 }
203
- >
204
+ < Paper className = { `${ classes . statusContainer } ml-20` } elevation = { 3 } >
204
205
< div className = { classes . userInfoText } >
205
206
< div className = { classes . statusText } >
206
207
< Box display = "flex" justifyContent = "flex-start" >
@@ -287,11 +288,7 @@ function DashboardPage({
287
288
style = { { background : themeColors . dashboard . supportCard } }
288
289
>
289
290
< div style = { { zIndex : 2 } } >
290
- < img
291
- src = { Logo }
292
- alt = "logo"
293
- className = { classes . supportLogo }
294
- />
291
+ < img src = { Logo } alt = "logo" className = { classes . supportLogo } />
295
292
< div className = "mt-40" > Gluu Services</ div >
296
293
< div className = "mt-40" > Community Support</ div >
297
294
< div className = "mt-40" > FAQ</ div >
@@ -309,9 +306,7 @@ function DashboardPage({
309
306
} }
310
307
>
311
308
< div className = { classes . textVertical } > WORLD</ div >
312
- < div className = { `${ classes . textVertical } text-center` } >
313
- WIDE
314
- </ div >
309
+ < div className = { `${ classes . textVertical } text-center` } > WIDE</ div >
315
310
< div className = { `${ classes . textVertical } text-right` } >
316
311
SU< span className = { `${ classes . redText } ` } > PP</ span > ORT
317
312
</ div >
@@ -329,9 +324,7 @@ function DashboardPage({
329
324
< div className = { classes . root } >
330
325
< Grid container className = "px-40" >
331
326
< Grid item lg = { breakDashboardCard ? 12 : 4 } md = { 12 } >
332
- < h3 className = "txt-white" >
333
- { t ( 'dashboard.summary_title' ) }
334
- </ h3 >
327
+ < h3 className = "txt-white" > { t ( 'dashboard.summary_title' ) } </ h3 >
335
328
< div className = "mt-20" >
336
329
{ summaryData . map ( ( data , key ) => (
337
330
< Paper key = { key } className = { classes . summary } >
@@ -341,21 +334,27 @@ function DashboardPage({
341
334
) ) }
342
335
</ div >
343
336
</ Grid >
344
- < Grid item lg = { breakDashboardCard ? 6 : 4 } md = { 6 } xs = { 12 } style = { { width : '100%' } } >
337
+ < Grid
338
+ item
339
+ lg = { breakDashboardCard ? 6 : 4 }
340
+ md = { 6 }
341
+ xs = { 12 }
342
+ style = { { width : '100%' } }
343
+ >
345
344
< Paper
346
345
className = { `${ classes . dashboardCard } top-minus-40` }
347
346
elevation = { 0 }
348
347
spacing = { 2 }
349
348
>
350
349
< Grid className = { classes . flex } container >
351
- < Grid
352
- item
353
- xs = { 12 }
354
- className = { isMobile ? 'mt-20' : '' }
355
- >
350
+ < Grid item xs = { 12 } className = { isMobile ? 'mt-20' : '' } >
356
351
< Paper
357
352
className = { classes . userInfo }
358
- style = { isTabletOrMobile || breakDashboardCard ? { marginLeft : 0 } : { } }
353
+ style = {
354
+ isTabletOrMobile || breakDashboardCard
355
+ ? { marginLeft : 0 }
356
+ : { }
357
+ }
359
358
elevation = { 3 }
360
359
>
361
360
< div className = { classes . userInfoTitle } >
@@ -386,19 +385,31 @@ function DashboardPage({
386
385
</ Grid >
387
386
</ Paper >
388
387
</ Grid >
389
- < Grid item lg = { breakDashboardCard ? 6 : 4 } md = { 6 } xs = { 12 } style = { { width : '100%' } } >
388
+ < Grid
389
+ item
390
+ lg = { breakDashboardCard ? 6 : 4 }
391
+ md = { 6 }
392
+ xs = { 12 }
393
+ style = { { width : '100%' } }
394
+ >
390
395
< StatusCard />
391
396
</ Grid >
392
397
</ Grid >
393
398
< Grid container className = { `px-40` } >
394
399
< Grid lg = { 12 } xs = { 12 } >
395
- < h3 className = "text-white" > { t ( 'dashboard.access_tokens_graph' ) } </ h3 >
400
+ < h3 className = "text-white" >
401
+ { t ( 'dashboard.access_tokens_graph' ) }
402
+ </ h3 >
396
403
{ isTabletOrMobile ? (
397
404
< Grid container className = { `${ classes . whiteBg } ` } >
398
405
< Grid
399
406
xs = { 12 }
400
407
item
401
- style = { isTabletOrMobile ? { marginLeft : 40 } : { marginLeft : 40 , marginBottom : 40 } }
408
+ style = {
409
+ isTabletOrMobile
410
+ ? { marginLeft : 40 }
411
+ : { marginLeft : 40 , marginBottom : 40 }
412
+ }
402
413
>
403
414
< div > { t ( 'dashboard.select_date_range' ) } </ div >
404
415
< DateRange />
@@ -409,7 +420,13 @@ function DashboardPage({
409
420
style = { isMobile ? mobileChartStyle : { } }
410
421
item
411
422
>
412
- < div className = { isTabletOrMobile ? classes . chartContainerTable : classes . chartContainer } >
423
+ < div
424
+ className = {
425
+ isTabletOrMobile
426
+ ? classes . chartContainerTable
427
+ : classes . chartContainer
428
+ }
429
+ >
413
430
< DashboardChart />
414
431
</ div >
415
432
</ Grid >
0 commit comments