@@ -85,16 +85,16 @@ export const ImportStateButton: React.FC<{}> = ({ }) => {
85
85
86
86
const dispatch = useDispatch ( ) ;
87
87
88
- let $uploadStateFile = React . createRef < HTMLInputElement > ( ) ;
88
+ const $uploadStateFile = React . createRef < HTMLInputElement > ( ) ;
89
89
90
- let handleFileUpload = ( event : React . FormEvent < HTMLElement > ) : void => {
90
+ const handleFileUpload = ( event : React . FormEvent < HTMLElement > ) : void => {
91
91
const target : any = event . target ;
92
92
if ( target && target . files ) {
93
- for ( let file of target . files ) {
93
+ for ( const file of target . files ) {
94
94
//const file: File = target.files[0];
95
95
( file as File ) . text ( ) . then ( ( text ) => {
96
96
try {
97
- let savedState = JSON . parse ( text ) ;
97
+ const savedState = JSON . parse ( text ) ;
98
98
dispatch ( dfActions . loadState ( savedState ) ) ;
99
99
} catch {
100
100
@@ -124,8 +124,8 @@ export const ExportStateButton: React.FC<{}> = ({}) => {
124
124
return < Tooltip title = "save session locally" >
125
125
< Button variant = "text" onClick = { ( ) => {
126
126
function download ( content : string , fileName : string , contentType : string ) {
127
- let a = document . createElement ( "a" ) ;
128
- let file = new Blob ( [ content ] , { type : contentType } ) ;
127
+ const a = document . createElement ( "a" ) ;
128
+ const file = new Blob ( [ content ] , { type : contentType } ) ;
129
129
a . href = URL . createObjectURL ( file ) ;
130
130
a . download = fileName ;
131
131
a . click ( ) ;
@@ -182,8 +182,8 @@ export const AppFC: FC<AppFCProps> = function AppFC(appProps) {
182
182
. then ( function ( response ) { return response . json ( ) ; } )
183
183
. then ( function ( result ) {
184
184
if ( Array . isArray ( result ) && result . length > 0 ) {
185
- let authInfo = result [ 0 ] ;
186
- let userInfo = {
185
+ const authInfo = result [ 0 ] ;
186
+ const userInfo = {
187
187
name : authInfo [ 'user_claims' ] . find ( ( item : any ) => item . typ == 'name' ) ?. val || '' ,
188
188
userId : authInfo [ 'user_id' ]
189
189
}
@@ -205,7 +205,7 @@ export const AppFC: FC<AppFCProps> = function AppFC(appProps) {
205
205
dispatch ( fetchAvailableModels ( ) ) ;
206
206
} , [ ] ) ;
207
207
208
- let theme = createTheme ( {
208
+ const theme = createTheme ( {
209
209
typography : {
210
210
fontFamily : [
211
211
"Arial" ,
@@ -230,7 +230,7 @@ export const AppFC: FC<AppFCProps> = function AppFC(appProps) {
230
230
} ,
231
231
} ) ;
232
232
233
- let switchers = (
233
+ const switchers = (
234
234
< Box sx = { { display : "flex" } } key = "switchers" >
235
235
< ToggleButtonGroup
236
236
color = "primary"
@@ -262,7 +262,7 @@ export const AppFC: FC<AppFCProps> = function AppFC(appProps) {
262
262
</ Box >
263
263
)
264
264
265
- let appBar = [
265
+ const appBar = [
266
266
< AppBar className = "app-bar" position = "static" key = "app-bar-main" >
267
267
< Toolbar variant = "dense" sx = { { backgroundColor : betaMode ? 'lavender' : '' } } >
268
268
< Button href = { "/" } sx = { { display : "flex" , flexDirection : "row" , textTransform : "none" ,
@@ -345,7 +345,7 @@ export const AppFC: FC<AppFCProps> = function AppFC(appProps) {
345
345
// </Dialog>
346
346
] ;
347
347
348
- let router = createBrowserRouter ( [
348
+ const router = createBrowserRouter ( [
349
349
{
350
350
path : "/about" ,
351
351
element : < About /> ,
@@ -358,7 +358,7 @@ export const AppFC: FC<AppFCProps> = function AppFC(appProps) {
358
358
}
359
359
] ) ;
360
360
361
- let app =
361
+ const app =
362
362
< Box sx = { { flexGrow : 1 , height : '100%' , overflow : "hidden" , display : "flex" , flexDirection : "column" } } >
363
363
{ appBar }
364
364
< RouterProvider router = { router } />
@@ -375,7 +375,7 @@ export const AppFC: FC<AppFCProps> = function AppFC(appProps) {
375
375
function stringAvatar ( name : string ) {
376
376
let displayName = ""
377
377
try {
378
- let nameSplit = name . split ( ' ' )
378
+ const nameSplit = name . split ( ' ' )
379
379
displayName = `${ nameSplit [ 0 ] [ 0 ] } ${ nameSplit . length > 1 ? nameSplit [ nameSplit . length - 1 ] [ 0 ] : '' } `
380
380
} catch {
381
381
displayName = name ? name [ 0 ] : "?" ;
0 commit comments