File tree Expand file tree Collapse file tree 7 files changed +116
-0
lines changed
shared/components/challenge-listing Expand file tree Collapse file tree 7 files changed +116
-0
lines changed 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+ < div styleName = "banner" >
13+ < div styleName = "content" >
14+ < div styleName = "banner-info" >
15+ < BannerInfoIcon />
16+ </ div >
17+ < span > Click < a href = { `${ config . PLATFORM_SITE_URL } /earn/find/challenges` } target = "_blank" rel = "noopener noreferrer" > here</ a > if you"d like to visit the new BETA Challenge Listings site.</ span >
18+ </ div >
19+
20+ < div
21+ styleName = "banner-close"
22+ onClick = { ( ) => setIsDisplayed ( false ) }
23+ aria-hidden = "true"
24+ role = "button"
25+ >
26+ < BannerCloseIcon />
27+ </ div >
28+ </ div >
29+ ) ;
30+ } ;
31+
32+ export default Banner ;
Original file line number Diff line number Diff line change 1+ @import " ~styles/mixins" ;
2+
3+ .banner {
4+ display : flex ;
5+ justify-content : space-between ;
6+ flex-direction : row ;
7+ align-items : center ;
8+ margin : 10px 15px 0 15px ;
9+ height : 50px ;
10+ background : linear-gradient (90deg , #2c95d7 0% , #06d6a0 100% );
11+
12+ border-radius : 10px ;
13+ color : #fff ;
14+ @include roboto-medium ;
15+ font-size : 16px ;
16+
17+ @include xs-to-sm {
18+ height : 81px ;
19+ line-height : 22px ;
20+ padding-left : 20px ;
21+ }
22+
23+ .content {
24+ display : flex ;
25+ justify-content : space-between ;
26+ flex-direction : row ;
27+ align-items : center ;
28+
29+ .banner-info {
30+ width : 24px ;
31+ height : 24px ;
32+ margin-left : 20px ;
33+ margin-right : 10px ;
34+
35+ @include xs-to-sm {
36+ display : none ;
37+ }
38+ }
39+
40+ @include xs-to-sm {
41+ width : 80% ;
42+ }
43+ }
44+
45+ .banner-close {
46+ width : 14px ;
47+ height : 14px ;
48+ margin-right : 30px ;
49+
50+ & :hover {
51+ cursor : pointer ;
52+ }
53+
54+ @include xs-to-sm {
55+ margin-bottom : 20px ;
56+ }
57+ }
58+ }
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