Skip to content

Commit 394fcf9

Browse files
authored
Merge pull request #6721 from topcoder-platform/timeline-wall-api-issues-26
fix: forums link
2 parents 0eb9250 + fc27993 commit 394fcf9

File tree

3 files changed

+72
-5
lines changed

3 files changed

+72
-5
lines changed
Lines changed: 3 additions & 0 deletions
Loading

src/shared/containers/timeline-wall/index.jsx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import React, { useState, useEffect } from 'react';
1+
import React, { useState, useEffect, useMemo } from 'react';
22
import PT from 'prop-types';
33
import { connect } from 'react-redux';
44
import TopBanner from 'assets/images/timeline-wall/top-banner.png';
55
import TopBannerMobile from 'assets/images/timeline-wall/top-banner-mobile.png';
66
import IconCheveronDownBlue from 'assets/images/timeline-wall/cheveron-down-blue.svg';
7+
import IconArrowRight from 'assets/images/timeline-wall/icon-arrow-right.svg';
78
import { deleteEventById, approveEventById, rejectEventById } from 'services/timelineWall';
89
import cn from 'classnames';
910
import moment from 'moment';
@@ -134,10 +135,23 @@ function TimelineWallContainer(props) {
134135
};
135136

136137
const sortedEvents = _.orderBy(events, ['eventDate'], ['desc']);
138+
const shouldShowDiscuss = useMemo(() => {
139+
if (tab !== 0) {
140+
return false;
141+
}
142+
if (isAdmin) {
143+
return !isMobile;
144+
}
145+
return true;
146+
}, [isAdmin, isMobile, tab]);
137147

138148
return (
139149
<div styleName="container">
140-
<div styleName={isAdmin ? 'header header-admin' : 'header'}>
150+
<div styleName={cn('header', {
151+
'header-admin': isAdmin,
152+
'header-with-discuss': shouldShowDiscuss,
153+
})}
154+
>
141155
<img src={TopBanner} alt="top-banner" styleName="header-bg hide-mobile" />
142156
<img src={TopBannerMobile} alt="top-banner" styleName="header-bg hide-desktop show-mobile" />
143157

@@ -167,6 +181,16 @@ function TimelineWallContainer(props) {
167181
</div>
168182
) : (<h1 styleName="header-content-1">Topcoder Timeline Wall</h1>)}
169183

184+
{shouldShowDiscuss ? (
185+
<button
186+
type="button"
187+
styleName="btn-discuss"
188+
>
189+
<span>DISCUSS</span>
190+
<IconArrowRight />
191+
</button>
192+
) : null}
193+
170194
<button
171195
onClick={() => {
172196
setShowRightFilterMobile(true);

src/shared/containers/timeline-wall/styles.scss

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@
1717
@media (max-width: 768px) {
1818
min-height: 190px;
1919
}
20-
}
2120

22-
.header-admin {
23-
min-height: 207px;
21+
&.header-with-discuss {
22+
@media (max-width: 768px) {
23+
min-height: 214px;
24+
}
25+
}
26+
27+
&.header-admin {
28+
min-height: 207px;
29+
}
2430
}
2531

2632
.header-content-1 {
@@ -68,6 +74,40 @@
6874
display: none !important;
6975
}
7076

77+
.btn-discuss {
78+
margin-top: 11px;
79+
display: flex;
80+
align-items: center;
81+
position: absolute;
82+
top: 33px;
83+
left: 1408px;
84+
padding: 0;
85+
background: transparent;
86+
border: none;
87+
color: white;
88+
89+
@media (max-width: 1500px) {
90+
left: unset;
91+
right: 0;
92+
}
93+
94+
@media (max-width: 768px) {
95+
position: relative;
96+
right: unset;
97+
top: 0;
98+
margin-left: 27px;
99+
}
100+
101+
span {
102+
@include roboto-bold;
103+
104+
font-weight: 700;
105+
font-size: 16px;
106+
line-height: 16px;
107+
margin-right: 4px;
108+
}
109+
}
110+
71111
.tab-item {
72112
border: none;
73113
background-color: transparent;

0 commit comments

Comments
 (0)