File tree Expand file tree Collapse file tree 11 files changed +147
-7
lines changed
__tests__/shared/components/challenge-listing/__snapshots__
components/challenge-listing Expand file tree Collapse file tree 11 files changed +147
-7
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ workflows:
276276 branches :
277277 only :
278278 - develop
279+ - nursoltan-s-issue-5490
279280 # This is alternate dev env for parallel testing
280281 - " build-test " :
281282 context : org-global
@@ -296,14 +297,14 @@ workflows:
296297 filters :
297298 branches :
298299 only :
299- - social-share-images
300+ - free
300301 # This is stage env for production QA releases
301302 - " build-prod-staging " :
302303 context : org-global
303304 filters :
304305 branches :
305306 only :
306- - free
307+ - develop
307308 - " approve-smoke-test-on-staging " :
308309 type : approval
309310 requires :
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ exports[`Matches shallow shapshot 1 shapshot 1 1`] = `
88 <Connect(Container)
99 setFilterState={ [MockFunction ]}
1010 />
11+ <Banner />
1112 <div
1213 className = " src-shared-components-challenge-listing-___style__tc-content-wrapper___1MqlF"
1314 >
@@ -64,6 +65,7 @@ exports[`Matches shallow shapshot 2 shapshot 2 1`] = `
6465 <Connect(Container)
6566 setFilterState={ [MockFunction ]}
6667 />
68+ <Banner />
6769 <div
6870 className = " src-shared-components-challenge-listing-___style__tc-content-wrapper___1MqlF"
6971 >
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ docker build -t $TAG \
3333 --build-arg OPEN_EXCHANGE_RATES_KEY=$OPEN_EXCHANGE_RATES_KEY \
3434 --build-arg SEGMENT_IO_API_KEY=$SEGMENT_IO_API_KEY \
3535 --build-arg CHAMELEON_VERIFICATION_SECRET=$CHAMELEON_VERIFICATION_SECRET \
36+ --build-arg PLATFORM_SITE_URL=$PLATFORM_SITE_URL \
3637 --build-arg SERVER_API_KEY=$SERVER_API_KEY \
3738 --build-arg TC_M2M_CLIENT_ID=$TC_M2M_CLIENT_ID \
3839 --build-arg TC_M2M_CLIENT_SECRET=$TC_M2M_CLIENT_SECRET \
Original file line number Diff line number Diff line change @@ -429,4 +429,5 @@ module.exports = {
429429 OPTIMIZELY : {
430430 SDK_KEY : '7V4CJhurXT3Y3bnzv1hv1' ,
431431 } ,
432+ PLATFORM_SITE_URL : 'https://platform.topcoder.com' ,
432433} ;
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ module.exports = {
44 URL : {
55 USER_SETTINGS : '' , /* No dev server is available for saved searches */
66 } ,
7+ PLATFORM_SITE_URL : 'https://platform.topcoder-dev.com' ,
78} ;
Original file line number Diff line number Diff line change 1+ import React , { useState } from 'react' ;
2+ import { config } from 'topcoder-react-utils' ;
3+
4+ import BannerCloseIcon from 'assets/images/banner-close.svg' ;
5+ import BannerInfoIcon from 'assets/images/banner-info.svg' ;
6+ import './style.scss' ;
7+
8+ const Banner = ( ) => {
9+ const [ isDisplayed , setIsDisplayed ] = useState ( true ) ;
10+
11+ return isDisplayed && (
12+ < a
13+ href = { `${ config . PLATFORM_SITE_URL } /earn/find/challenges` }
14+ target = "_blank"
15+ rel = "noopener noreferrer"
16+ styleName = "banner"
17+ >
18+ < div styleName = "content" >
19+ < div styleName = "banner-info" >
20+ < BannerInfoIcon />
21+ </ div >
22+ < span >
23+ Click here if you'd like to visit the new Beta Challenge Listings site
24+ </ span >
25+ </ div >
26+
27+ < div
28+ styleName = "banner-close"
29+ onClick = { ( e ) => {
30+ e . preventDefault ( ) ;
31+ setIsDisplayed ( false ) ;
32+ } }
33+ aria-hidden = "true"
34+ role = "button"
35+ >
36+ < BannerCloseIcon />
37+ </ div >
38+ </ a >
39+ ) ;
40+ } ;
41+
42+ export default Banner ;
Original file line number Diff line number Diff line change 1+ @import " ~styles/mixins" ;
2+
3+ .banner {
4+ @include roboto-medium ;
5+
6+ @include xs-to-sm {
7+ height : 81px ;
8+ line-height : 22px ;
9+ padding-left : 20px ;
10+ }
11+
12+ display : flex ;
13+ justify-content : space-between ;
14+ flex-direction : row ;
15+ align-items : center ;
16+ margin : 10px 15px 0 15px ;
17+ height : 50px ;
18+ background : linear-gradient (90deg , #2c95d7 0% , #06d6a0 100% );
19+ border-radius : 10px ;
20+ color : #fff ;
21+ font-size : 16px ;
22+
23+ .content {
24+ display : flex ;
25+ justify-content : space-between ;
26+ flex-direction : row ;
27+ align-items : center ;
28+ color : #fff ;
29+
30+ .banner-info {
31+ width : 24px ;
32+ height : 24px ;
33+ margin-left : 20px ;
34+ margin-right : 10px ;
35+
36+ @include xs-to-sm {
37+ display : none ;
38+ }
39+ }
40+
41+ @include xs-to-sm {
42+ width : 80% ;
43+ }
44+ }
45+
46+ .banner-close {
47+ width : 14px ;
48+ height : 14px ;
49+ margin-right : 30px ;
50+
51+ & :hover {
52+ cursor : pointer ;
53+ }
54+
55+ @include xs-to-sm {
56+ margin-bottom : 20px ;
57+ }
58+ }
59+ }
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { useMediaQuery } from 'react-responsive';
1818import NoChallengeCard from './NoChallengeCard' ;
1919import Listing from './Listing' ;
2020// import ChallengeCardPlaceholder from './placeholders/ChallengeCard';
21+ import Banner from './Banner' ;
2122
2223import './style.scss' ;
2324
@@ -167,6 +168,8 @@ export default function ChallengeListing(props) {
167168 )
168169 }
169170
171+ < Banner />
172+
170173 < div styleName = "tc-content-wrapper" >
171174 < div styleName = { desktop ? 'sidebar-container-desktop' : 'sidebar-container-mobile' } >
172175 < Sidebar
You can’t perform that action at this time.
0 commit comments