Skip to content

Commit 03f7fa6

Browse files
committed
Implement #6003
1 parent b9f1c07 commit 03f7fa6

File tree

5 files changed

+58
-1
lines changed

5 files changed

+58
-1
lines changed

__tests__/shared/components/Header/__snapshots__/index.jsx.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ exports[`Default render 1`] = `
5252
"logged": false,
5353
"title": "How It Works",
5454
},
55+
Object {
56+
"href": "https://discord.gg/topcoder",
57+
"openNewTab": true,
58+
"title": "Join Discord",
59+
},
5560
],
5661
"subMenu": Array [
5762
Object {

__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ exports[`Matches shallow shapshot 1`] = `
4646
>
4747
<a
4848
href="https://www.topcoder-dev.com/challenges"
49+
target="_self"
4950
>
5051
All Challenges
5152
</a>
@@ -55,6 +56,7 @@ exports[`Matches shallow shapshot 1`] = `
5556
>
5657
<a
5758
href="https://www.topcoder-dev.com/community/arena"
59+
target="_self"
5860
>
5961
Competitive Programming
6062
</a>
@@ -64,6 +66,7 @@ exports[`Matches shallow shapshot 1`] = `
6466
>
6567
<a
6668
href="https://www.topcoder-dev.com/gigs"
69+
target="_self"
6770
>
6871
Gig Work
6972
</a>
@@ -73,6 +76,7 @@ exports[`Matches shallow shapshot 1`] = `
7376
>
7477
<a
7578
href="https://www.topcoder-dev.com/community/practice"
79+
target="_self"
7680
>
7781
Practice
7882
</a>
@@ -98,6 +102,7 @@ exports[`Matches shallow shapshot 1`] = `
98102
>
99103
<a
100104
href="https://www.topcoder-dev.com/thrive/tracks?track=Competitive%20Programming"
105+
target="_self"
101106
>
102107
Competitive Programming
103108
</a>
@@ -107,6 +112,7 @@ exports[`Matches shallow shapshot 1`] = `
107112
>
108113
<a
109114
href="https://www.topcoder-dev.com/thrive/tracks?track=Data%20Science&tax="
115+
target="_self"
110116
>
111117
Data Science
112118
</a>
@@ -116,6 +122,7 @@ exports[`Matches shallow shapshot 1`] = `
116122
>
117123
<a
118124
href="https://www.topcoder-dev.com/thrive/tracks?track=Design&tax="
125+
target="_self"
119126
>
120127
Design
121128
</a>
@@ -125,6 +132,7 @@ exports[`Matches shallow shapshot 1`] = `
125132
>
126133
<a
127134
href="https://www.topcoder-dev.com/thrive/tracks?track=Development&tax="
135+
target="_self"
128136
>
129137
Development
130138
</a>
@@ -134,6 +142,7 @@ exports[`Matches shallow shapshot 1`] = `
134142
>
135143
<a
136144
href="https://www.topcoder-dev.com/thrive/tracks?track=QA&tax="
145+
target="_self"
137146
>
138147
QA
139148
</a>
@@ -159,6 +168,7 @@ exports[`Matches shallow shapshot 1`] = `
159168
>
160169
<a
161170
href="https://www.topcoder-dev.com/blog"
171+
target="_self"
162172
>
163173
Blog
164174
</a>
@@ -168,6 +178,7 @@ exports[`Matches shallow shapshot 1`] = `
168178
>
169179
<a
170180
href="https://www.topcoder-dev.com/community/events"
181+
target="_self"
171182
>
172183
Events Calendar
173184
</a>
@@ -177,6 +188,7 @@ exports[`Matches shallow shapshot 1`] = `
177188
>
178189
<a
179190
href="https://vanilla.topcoder-dev.com"
191+
target="_self"
180192
>
181193
Forums
182194
</a>
@@ -186,6 +198,7 @@ exports[`Matches shallow shapshot 1`] = `
186198
>
187199
<a
188200
href="https://www.topcoder-dev.com/community/member-programs"
201+
target="_self"
189202
>
190203
Programs
191204
</a>
@@ -195,6 +208,7 @@ exports[`Matches shallow shapshot 1`] = `
195208
>
196209
<a
197210
href="https://www.topcoder-dev.com/community/statistics"
211+
target="_self"
198212
>
199213
Statistics
200214
</a>
@@ -204,6 +218,7 @@ exports[`Matches shallow shapshot 1`] = `
204218
>
205219
<a
206220
href="https://www.topcoder-dev.com/community/member-programs/topcoder-open"
221+
target="_self"
207222
>
208223
TCO
209224
</a>
@@ -213,10 +228,21 @@ exports[`Matches shallow shapshot 1`] = `
213228
>
214229
<a
215230
href="https://www.topcoder-dev.com/thrive"
231+
target="_self"
216232
>
217233
Thrive
218234
</a>
219235
</li>
236+
<li
237+
className="src-shared-components-TopcoderFooter-___style__link___3-nzm"
238+
>
239+
<a
240+
href="https://discord.gg/topcoder"
241+
target="_blank"
242+
>
243+
Join Discord
244+
</a>
245+
</li>
220246
</ul>
221247
</div>
222248
<div
@@ -238,6 +264,7 @@ exports[`Matches shallow shapshot 1`] = `
238264
>
239265
<a
240266
href="https://www.topcoder-dev.com/thrive/tracks?track=Topcoder&tax=Getting%20Paid"
267+
target="_self"
241268
>
242269
Getting Paid
243270
</a>
@@ -247,6 +274,7 @@ exports[`Matches shallow shapshot 1`] = `
247274
>
248275
<a
249276
href="https://www.topcoder-dev.com/thrive/tracks?track=Topcoder&tax=FAQ"
277+
target="_self"
250278
>
251279
FAQ
252280
</a>
@@ -256,6 +284,7 @@ exports[`Matches shallow shapshot 1`] = `
256284
>
257285
<a
258286
href="https://www.topcoder-dev.com/thrive/tracks?track=Topcoder"
287+
target="_self"
259288
>
260289
General Info
261290
</a>
@@ -265,6 +294,7 @@ exports[`Matches shallow shapshot 1`] = `
265294
>
266295
<a
267296
href="mailto:support@topcoder.com"
297+
target="_self"
268298
>
269299
Website Help
270300
</a>
@@ -290,6 +320,7 @@ exports[`Matches shallow shapshot 1`] = `
290320
>
291321
<a
292322
href="https://www.topcoder-dev.com/community/contact"
323+
target="_self"
293324
>
294325
Contact Us
295326
</a>
@@ -299,6 +330,7 @@ exports[`Matches shallow shapshot 1`] = `
299330
>
300331
<a
301332
href="https://accounts-auth0.topcoder-dev.com?utm_source=community&utm_campaign=tc-footer&utm_medium=promotion&retUrl="
333+
target="_self"
302334
>
303335
Join Community
304336
</a>
@@ -308,6 +340,7 @@ exports[`Matches shallow shapshot 1`] = `
308340
>
309341
<a
310342
href="https://www.topcoder-dev.com/community/learn"
343+
target="_self"
311344
>
312345
About Community
313346
</a>
@@ -317,6 +350,7 @@ exports[`Matches shallow shapshot 1`] = `
317350
>
318351
<a
319352
href="https://www.topcoder-dev.com/community/changelog"
353+
target="_self"
320354
>
321355
Changelog
322356
</a>
@@ -326,6 +360,7 @@ exports[`Matches shallow shapshot 1`] = `
326360
>
327361
<a
328362
href="https://www.topcoder-dev.com/contact-us/"
363+
target="_self"
329364
>
330365
Talk to Sales
331366
</a>

config/default.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@ module.exports = {
327327
href: '/thrive/tracks?track=Topcoder',
328328
logged: false,
329329
},
330+
{
331+
title: 'Join Discord',
332+
href: 'https://discord.gg/topcoder',
333+
openNewTab: true,
334+
},
330335
],
331336
subMenu: [
332337
{

config/production.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ module.exports = {
108108
href: '/thrive/tracks?track=Topcoder',
109109
logged: false,
110110
},
111+
{
112+
title: 'Join Discord',
113+
href: 'https://discord.gg/topcoder',
114+
openNewTab: true,
115+
},
111116
],
112117
subMenu: [
113118
{

src/shared/components/TopcoderFooter/index.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,25 @@ import './style.scss';
1717
function Link({
1818
children,
1919
to,
20+
openNewTab,
2021
}) {
2122
return (
2223
<li styleName="link">
23-
<a href={to}>
24+
<a href={to} target={openNewTab ? '_blank' : '_self'}>
2425
{children}
2526
</a>
2627
</li>
2728
);
2829
}
2930

31+
Link.defaultProps = {
32+
openNewTab: false,
33+
};
34+
3035
Link.propTypes = {
3136
to: PT.string.isRequired,
3237
children: PT.node.isRequired,
38+
openNewTab: PT.bool,
3339
};
3440

3541
export default function TopcoderFooter() {
@@ -75,6 +81,7 @@ export default function TopcoderFooter() {
7581
<Link to={`${base}/community/statistics`}>Statistics</Link>
7682
<Link to={`${base}/community/member-programs/topcoder-open`}>TCO</Link>
7783
<Link to={`${base}/thrive`}>Thrive</Link>
84+
<Link to="https://discord.gg/topcoder" openNewTab>Join Discord</Link>
7885
</ul>
7986
</div>
8087
<div styleName="navi-col">

0 commit comments

Comments
 (0)