File tree Expand file tree Collapse file tree 3 files changed +39
-12
lines changed
ChallengeEditor/ChallengeView Expand file tree Collapse file tree 3 files changed +39
-12
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ const ChallengeView = ({
8989 < Helmet title = 'View Details' />
9090 { ! isTask && (
9191 < div className = { cn ( styles . actionButtons , styles . button , styles . actionButtonsLeft ) } >
92- < LegacyLinks challenge = { challenge } />
92+ < LegacyLinks challenge = { challenge } challengeView />
9393 </ div >
9494 ) }
9595 < div className = { styles . title } > View Details</ div >
@@ -230,15 +230,6 @@ const ChallengeView = ({
230230 readOnly
231231 />
232232 ) }
233- < div >
234- { challenge . discussions && challenge . discussions . map ( d => (
235- < div key = { d . id } className = { cn ( styles . row , styles . topRow ) } >
236- < div className = { styles . col } >
237- < span > < span className = { styles . fieldTitle } > Forum:</ span > < a href = { d . url } target = '_blank' rel = 'noopener noreferrer' > { d . name } </ a > </ span >
238- </ div >
239- </ div >
240- ) ) }
241- </ div >
242233 </ div >
243234 < div className = { styles . group } >
244235 < div className = { styles . title } > Public specification < span > *</ span > </ div >
Original file line number Diff line number Diff line change 22.container {
33 display : flex ;
44 margin-top : auto ;
5+ align-items : center ;
56
67 button :not (:first-child ),
78 a :not (:first-child ) {
1314 outline : none ;
1415 white-space : nowrap ;
1516 }
17+
18+ .row {
19+ margin-bottom : 0 ;
20+
21+ & .topRow {
22+ flex-wrap : wrap ;
23+ }
24+ }
25+
26+ .col {
27+ margin-right : 20px ;
28+ display : flex ;
29+ align-items : center ;
30+
31+ .fieldTitle {
32+ @include roboto-bold ();
33+
34+ font-size : 16px ;
35+ line-height : 19px ;
36+ font-weight : 500 ;
37+ color : $tc-gray-80 ;
38+ margin-right : 10px ;
39+ }
40+ }
1641}
Original file line number Diff line number Diff line change 33 */
44import React , { useCallback } from 'react'
55import PropTypes from 'prop-types'
6+ import cn from 'classnames'
67import styles from './LegacyLinks.module.scss'
78import { DIRECT_PROJECT_URL , MESSAGE , ONLINE_REVIEW_URL } from '../../config/constants'
89import PrimaryButton from '../Buttons/PrimaryButton'
910import Tooltip from '../Tooltip'
1011
11- const LegacyLinks = ( { challenge } ) => {
12+ const LegacyLinks = ( { challenge, challengeView } ) => {
1213 const onClick = useCallback ( ( e ) => {
1314 e . stopPropagation ( )
1415 } , [ ] )
@@ -38,12 +39,22 @@ const LegacyLinks = ({ challenge }) => {
3839 </ Tooltip >
3940 </ >
4041 ) }
42+ < div >
43+ { challengeView && challenge . discussions && challenge . discussions . map ( d => (
44+ < div key = { d . id } className = { cn ( styles . row , styles . topRow ) } >
45+ < div className = { styles . col } >
46+ < span > < span className = { styles . fieldTitle } > Forum:</ span > < a href = { d . url } target = '_blank' rel = 'noopener noreferrer' > { d . name } </ a > </ span >
47+ </ div >
48+ </ div >
49+ ) ) }
50+ </ div >
4151 </ div >
4252 )
4353}
4454
4555LegacyLinks . propTypes = {
46- challenge : PropTypes . object
56+ challenge : PropTypes . object ,
57+ challengeView : PropTypes . bool
4758}
4859
4960export default LegacyLinks
You can’t perform that action at this time.
0 commit comments