@@ -263,39 +263,35 @@ export class MatchmakingButton extends LitElement {
263263 }
264264
265265 render ( ) {
266- if ( this . isLoggedIn ) {
267- return html `
268- < button
269- @click ="${ this . handleLoggedInClick } "
270- class ="no-crazygames w-full h-20 bg-purple-600 hover:bg-purple-500 text-white font-black uppercase tracking-widest rounded-xl transition-all duration-200 flex flex-col items-center justify-center group overflow-hidden relative "
271- title ="${ translateText ( "matchmaking_modal.title" ) } "
272- >
273- < span class ="relative z-10 text-2xl ">
274- ${ translateText ( "matchmaking_button.play_ranked" ) }
275- </ span >
276- < span
277- class ="relative z-10 text-xs font-medium text-purple-100 opacity-90 group-hover:opacity-100 transition-opacity "
266+ const button = this . isLoggedIn
267+ ? html `
268+ < button
269+ @click ="${ this . handleLoggedInClick } "
270+ class ="no-crazygames w-full h-20 bg-purple-600 hover:bg-purple-500 text-white font-black uppercase tracking-widest rounded-xl transition-all duration-200 flex flex-col items-center justify-center group overflow-hidden relative "
271+ title ="${ translateText ( "matchmaking_modal.title" ) } "
278272 >
279- ${ translateText ( "matchmaking_button.description" ) }
280- </ span >
281- </ button >
282-
283- < matchmaking-modal > </ matchmaking-modal >
284- ` ;
285- }
286-
287- return html `
288- < button
289- @click ="${ this . handleLoggedOutClick } "
290- class ="no-crazygames w-full h-20 bg-purple-600 hover:bg-purple-500 text-white font-black uppercase tracking-widest rounded-xl transition-all duration-200 flex flex-col items-center justify-center overflow-hidden relative cursor-pointer "
291- >
292- < span class ="relative z-10 text-2xl ">
293- ${ translateText ( "matchmaking_button.login_required" ) }
294- </ span >
295- </ button >
273+ < span class ="relative z-10 text-2xl ">
274+ ${ translateText ( "matchmaking_button.play_ranked" ) }
275+ </ span >
276+ < span
277+ class ="relative z-10 text-xs font-medium text-purple-100 opacity-90 group-hover:opacity-100 transition-opacity "
278+ >
279+ ${ translateText ( "matchmaking_button.description" ) }
280+ </ span >
281+ </ button >
282+ `
283+ : html `
284+ < button
285+ @click ="${ this . handleLoggedOutClick } "
286+ class ="no-crazygames w-full h-20 bg-purple-600 hover:bg-purple-500 text-white font-black uppercase tracking-widest rounded-xl transition-all duration-200 flex flex-col items-center justify-center overflow-hidden relative cursor-pointer "
287+ >
288+ < span class ="relative z-10 text-2xl ">
289+ ${ translateText ( "matchmaking_button.login_required" ) }
290+ </ span >
291+ </ button >
292+ ` ;
296293
297- < matchmaking-modal > </ matchmaking-modal >
298- ` ;
294+ return html ` ${ button } < matchmaking-modal > </ matchmaking-modal > ` ;
299295 }
300296
301297 private handleLoggedInClick ( ) {
0 commit comments