@@ -10,6 +10,7 @@ import range from 'lodash/range';
1010import reverse from 'lodash/reverse' ;
1111import { useDispatch } from 'react-redux' ;
1212
13+ import i18n from '../../../i18n' ;
1314import mapStagesToTitle from '../../config/mapStagesToTitle' ;
1415import { uploadPlayersMatches } from '../../middlewares/Tournament' ;
1516import { actions } from '../../slices' ;
@@ -26,15 +27,15 @@ const navPlayerTabsClassName = cn(
2627) ;
2728
2829const tabLinkClassName = ( active , isCurrent = false ) => cn (
29- 'nav-item nav-link text-uppercase text-nowrap rounded-0 font-weight-bold p-3 border-0 w-100' , {
30- active,
31- 'text-primary' : isCurrent ,
32- } ,
33- ) ;
30+ 'nav-item nav-link text-uppercase text-nowrap rounded-0 font-weight-bold p-3 border-0 w-100' , {
31+ active,
32+ 'text-primary' : isCurrent ,
33+ } ,
34+ ) ;
3435
3536const tabContentClassName = active => cn ( 'tab-pane fade' , {
36- 'd-flex flex-column show active' : active ,
37- } ) ;
37+ 'd-flex flex-column show active' : active ,
38+ } ) ;
3839
3940const PlayersList = memo (
4041 ( {
@@ -44,27 +45,27 @@ const PlayersList = memo(
4445 searchedUserId,
4546 hideBots,
4647 } ) => players . map ( player => {
47- if ( player . id === searchedUserId ) {
48- return < > </ > ;
49- }
48+ if ( player . id === searchedUserId ) {
49+ return < > </ > ;
50+ }
5051
51- const userMatches = matchList . filter ( match => match . playerIds . includes ( player . id ) ) ;
52+ const userMatches = matchList . filter ( match => match . playerIds . includes ( player . id ) ) ;
5253
53- return (
54- < TournamentUserPanel
55- key = { `user-panel-${ player . id } ` }
56- matches = { userMatches }
57- currentUserId = { currentUserId }
58- userId = { player . id }
59- name = { player . name }
60- score = { player . score }
61- place = { player . place }
62- isBanned = { player . isBanned }
63- searchedUserId = { searchedUserId }
64- hideBots = { hideBots }
65- />
66- ) ;
67- } ) ,
54+ return (
55+ < TournamentUserPanel
56+ key = { `user-panel-${ player . id } ` }
57+ matches = { userMatches }
58+ currentUserId = { currentUserId }
59+ userId = { player . id }
60+ name = { player . name }
61+ score = { player . score }
62+ place = { player . place }
63+ isBanned = { player . isBanned }
64+ searchedUserId = { searchedUserId }
65+ hideBots = { hideBots }
66+ />
67+ ) ;
68+ } ) ,
6869) ;
6970
7071const SearchedUserPanel = memo ( ( {
@@ -111,20 +112,20 @@ function RatingPanel({
111112
112113 const playersList = useMemo (
113114 ( ) => Object . values ( players )
114- . sort ( ( a , b ) => b . score - a . score )
115- . slice ( 0 + pageSize * ( pageNumber - 1 ) , pageSize * pageNumber )
116- . reduce ( ( acc , player ) => {
117- if ( player . isBot && hideBots ) {
118- return acc ;
119- }
115+ . sort ( ( a , b ) => b . score - a . score )
116+ . slice ( 0 + pageSize * ( pageNumber - 1 ) , pageSize * pageNumber )
117+ . reduce ( ( acc , player ) => {
118+ if ( player . isBot && hideBots ) {
119+ return acc ;
120+ }
120121
121- if ( player . id === currentUserId ) {
122- return [ player , ...acc ] ;
123- }
122+ if ( player . id === currentUserId ) {
123+ return [ player , ...acc ] ;
124+ }
124125
125- acc . push ( player ) ;
126- return acc ;
127- } , [ ] ) ,
126+ acc . push ( player ) ;
127+ return acc ;
128+ } , [ ] ) ,
128129 [ players , currentUserId , pageSize , pageNumber , hideBots ] ,
129130 ) ;
130131 const topPlayersList = useMemo (
@@ -178,7 +179,7 @@ function RatingPanel({
178179 'text-uppercase font-weight-bold pt-2' ,
179180 ) }
180181 >
181- Wait reviling results
182+ { i18n . t ( ' Wait reviling results' ) }
182183 </ div >
183184 ) ;
184185 }
0 commit comments