@@ -60,10 +60,6 @@ export const Library = ({ library, showRecentsOnly }: Props) => {
60
60
setShowModal ( { game : appName , show : true , runner } )
61
61
}
62
62
63
- if ( refreshing && ! showRecentsOnly ) {
64
- return < UpdateComponent inline />
65
- }
66
-
67
63
function titleWithIcons ( ) {
68
64
return (
69
65
< div className = "titleWithIcons" >
@@ -106,57 +102,61 @@ export const Library = ({ library, showRecentsOnly }: Props) => {
106
102
< h3 className = "libraryHeader" >
107
103
{ showRecentsOnly ? t ( 'Recent' , 'Played Recently' ) : titleWithIcons ( ) }
108
104
</ h3 >
109
- < div
110
- style = { ! library . length ? { backgroundColor : 'transparent' } : { } }
111
- className = { cx ( {
112
- gameList : showRecentsOnly || layout === 'grid' ,
113
- gameListLayout : layout !== 'grid' && ! showRecentsOnly
114
- } ) }
115
- >
116
- { ! ! library . length &&
117
- list . map (
118
- ( {
119
- title,
120
- art_square,
121
- art_cover,
122
- art_logo,
123
- app_name,
124
- is_installed,
125
- is_mac_native,
126
- is_linux_native,
127
- runner,
128
- cloud_save_enabled,
129
- is_game,
130
- install : { version, install_size, is_dlc }
131
- } : GameInfo ) => {
132
- if ( is_dlc ) {
133
- return null
105
+ { refreshing && ! showRecentsOnly ? (
106
+ < UpdateComponent inline />
107
+ ) : (
108
+ < div
109
+ style = { ! library . length ? { backgroundColor : 'transparent' } : { } }
110
+ className = { cx ( {
111
+ gameList : showRecentsOnly || layout === 'grid' ,
112
+ gameListLayout : layout !== 'grid' && ! showRecentsOnly
113
+ } ) }
114
+ >
115
+ { ! ! library . length &&
116
+ list . map (
117
+ ( {
118
+ title,
119
+ art_square,
120
+ art_cover,
121
+ art_logo,
122
+ app_name,
123
+ is_installed,
124
+ is_mac_native,
125
+ is_linux_native,
126
+ runner,
127
+ cloud_save_enabled,
128
+ is_game,
129
+ install : { version, install_size, is_dlc }
130
+ } : GameInfo ) => {
131
+ if ( is_dlc ) {
132
+ return null
133
+ }
134
+ const hasUpdate = gameUpdates ?. includes ( app_name )
135
+ return (
136
+ < GameCard
137
+ key = { app_name }
138
+ runner = { runner }
139
+ cover = { art_square }
140
+ coverList = { art_cover }
141
+ logo = { art_logo }
142
+ hasCloudSave = { cloud_save_enabled }
143
+ title = { title }
144
+ appName = { app_name }
145
+ isInstalled = { is_installed }
146
+ isGame = { is_game }
147
+ version = { `${ version } ` }
148
+ size = { `${ install_size } ` }
149
+ hasUpdate = { hasUpdate }
150
+ buttonClick = { ( ) => handleModal ( app_name , runner ) }
151
+ forceCard = { showRecentsOnly }
152
+ isMacNative = { is_mac_native }
153
+ isLinuxNative = { is_linux_native }
154
+ />
155
+ )
134
156
}
135
- const hasUpdate = gameUpdates ?. includes ( app_name )
136
- return (
137
- < GameCard
138
- key = { app_name }
139
- runner = { runner }
140
- cover = { art_square }
141
- coverList = { art_cover }
142
- logo = { art_logo }
143
- hasCloudSave = { cloud_save_enabled }
144
- title = { title }
145
- appName = { app_name }
146
- isInstalled = { is_installed }
147
- isGame = { is_game }
148
- version = { `${ version } ` }
149
- size = { `${ install_size } ` }
150
- hasUpdate = { hasUpdate }
151
- buttonClick = { ( ) => handleModal ( app_name , runner ) }
152
- forceCard = { showRecentsOnly }
153
- isMacNative = { is_mac_native }
154
- isLinuxNative = { is_linux_native }
155
- />
156
- )
157
- }
158
- ) }
159
- </ div >
157
+ ) }
158
+ </ div >
159
+ ) }
160
160
{ ! showRecentsOnly && (
161
161
< button id = "backToTopBtn" onClick = { backToTop } ref = { backToTopElement } >
162
162
< ArrowDropUp className = "material-icons" />
0 commit comments