25
25
*/
26
26
27
27
import React from 'react' ;
28
- import PT , { number } from 'prop-types' ;
28
+ import PT from 'prop-types' ;
29
29
import { Avatar } from 'topcoder-react-ui-kit' ;
30
30
import { config } from 'topcoder-react-utils' ;
31
31
import _ from 'lodash' ;
@@ -127,7 +127,6 @@ export default function PodiumSpot(props) {
127
127
isTopGear,
128
128
isAlgo,
129
129
themeName,
130
- podiumPlaces,
131
130
} = props ;
132
131
133
132
const stylesName = THEME [ themeName ] ;
@@ -141,7 +140,7 @@ export default function PodiumSpot(props) {
141
140
if ( photoUrl ) {
142
141
photoUrl = `${ config . CDN . PUBLIC } /avatar/${ encodeURIComponent ( photoUrl ) } ?size=160` ;
143
142
}
144
- let rootStyle = `${ stylesName } .${ podiumPlaces > 3 ? 'PodiumSpotCondense' : 'PodiumSpot' } ` ;
143
+ let rootStyle = `${ stylesName } .${ themeName === 'TCO23' ? 'PodiumSpotCondense' : 'PodiumSpot' } ` ;
145
144
if ( PODIUM_ITEM_MODIFIER [ competitor . rank ] ) rootStyle += ` ${ stylesName } .PodiumSpot--${ PODIUM_ITEM_MODIFIER [ competitor . rank ] } ` ;
146
145
const fulfillment = competitor [ 'tco_leaderboard.fulfillment' ]
147
146
? ( parseFloat ( competitor [ 'tco_leaderboard.fulfillment' ] ) * 100 ) . toFixed ( 2 ) . replace ( / [ . , ] 0 0 $ / , '' )
@@ -175,24 +174,15 @@ export default function PodiumSpot(props) {
175
174
< div styleName = { `${ stylesName } .wave-wrap--${ PODIUM_ITEM_MODIFIER [ competitor . rank > 4 ? 4 : competitor . rank ] } ` } >
176
175
< svg
177
176
xmlns = "http://www.w3.org/2000/svg"
178
- width = { podiumPlaces > 3 ? 200 : 392 }
179
- height = { podiumPlaces > 3 ? 16 : 25 }
177
+ width = { 200 }
178
+ height = { 16 }
180
179
fill = "none"
181
- viewBox = { ` 0 0 ${ podiumPlaces > 3 ? 200 : 392 } ${ podiumPlaces > 3 ? 16 : 25 } ` }
180
+ viewBox = " 0 0 200 16"
182
181
>
183
- {
184
- podiumPlaces > 3 ? (
185
- < path
186
- fill = "#fff"
187
- d = "M149.572 0.823649C173.331 0.823652 191.313 6.86156 198 9.88051L198 0.0893164L7.94832e-07 0.0892861L3.05705e-07 9.88048C6.08897 12.3283 17.0268 16 38.0337 16C64.2924 16 122.203 0.823644 149.572 0.823649Z"
188
- />
189
- ) : (
190
- < path
191
- fill = "#fff"
192
- d = "M296.123 1.385c47.038 0 82.638 9.395 95.877 14.093V.242H0v15.236C12.055 19.287 33.71 25 75.3 25c51.986 0 166.637-23.615 220.823-23.615z"
193
- />
194
- )
195
- }
182
+ < path
183
+ fill = "#fff"
184
+ d = "M149.572 0.823649C173.331 0.823652 191.313 6.86156 198 9.88051L198 0.0893164L7.94832e-07 0.0892861L3.05705e-07 9.88048C6.08897 12.3283 17.0268 16 38.0337 16C64.2924 16 122.203 0.823644 149.572 0.823649Z"
185
+ />
196
186
</ svg >
197
187
< span styleName = { `${ stylesName } .leaderboard-avatar` } >
198
188
{
@@ -376,7 +366,6 @@ PodiumSpot.propTypes = {
376
366
isTopGear : PT . bool ,
377
367
isAlgo : PT . bool ,
378
368
themeName : PT . string ,
379
- podiumPlaces : number ,
380
369
} ;
381
370
382
371
PodiumSpot . defaultProps = {
@@ -385,5 +374,4 @@ PodiumSpot.defaultProps = {
385
374
isTopGear : false ,
386
375
isAlgo : false ,
387
376
themeName : 'Default' ,
388
- podiumPlaces : 1 ,
389
377
} ;
0 commit comments