Skip to content

Commit a2393f9

Browse files
committed
More updates in Blockchain community
1 parent eb42378 commit a2393f9

File tree

10 files changed

+51
-40
lines changed

10 files changed

+51
-40
lines changed

.exchange-rates.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1505386800,"base":"USD","rates":{"AED":3.673158,"AFN":68.611894,"ALL":112.15,"AMD":481.92,"ANG":1.794523,"AOA":165.9215,"ARS":17.066,"AUD":1.249345,"AWG":1.795251,"AZN":1.7,"BAM":1.6431,"BBD":2,"BDT":82.894,"BGN":1.643955,"BHD":0.377055,"BIF":1759.05,"BMD":1,"BND":1.350403,"BOB":7.023352,"BRL":3.135,"BSD":1,"BTC":0.000266995252,"BTN":64.035128,"BWP":10.112596,"BYN":1.938403,"BZD":2.032115,"CAD":1.217325,"CDF":1561.940781,"CHF":0.967193,"CLF":0.02329,"CLP":626.8,"CNH":6.556964,"CNY":6.55575,"COP":2910.25,"CRC":582.225,"CUC":1,"CUP":25.5,"CVE":92.9375,"CZK":21.927983,"DJF":178.77,"DKK":6.25181,"DOP":48.012,"DZD":111.3885,"EGP":17.6687,"ERN":15.337793,"ETB":23.618196,"EUR":0.840246,"FJD":2.011297,"FKP":0.757335,"GBP":0.757335,"GEL":2.45685,"GGP":0.757335,"GHS":4.4225,"GIP":0.757335,"GMD":46.1,"GNF":9025.2,"GTQ":7.294539,"GYD":209.48,"HKD":7.811815,"HNL":23.539555,"HRK":6.287045,"HTG":63.68792,"HUF":258.93425,"IDR":13238.951073,"ILS":3.53598,"IMP":0.757335,"INR":64.0855,"IQD":1183,"IRR":33310,"ISK":106.888322,"JEP":0.757335,"JMD":130.465,"JOD":0.708801,"JPY":110.42203846,"KES":102.88375,"KGS":68.673222,"KHR":4085,"KMF":414.140225,"KPW":900,"KRW":1132.0125,"KWD":0.301593,"KYD":0.833412,"KZT":339.12,"LAK":8306,"LBP":1518.75,"LKR":152.9,"LRD":117.05,"LSL":13.135,"LYD":1.368496,"MAD":9.36405,"MDL":17.64455,"MGA":2989.1,"MKD":51.737886,"MMK":1364.5,"MNT":2451.368617,"MOP":8.11233,"MRO":364.62652,"MUR":33.4785,"MVR":15.409873,"MWK":725.64,"MXN":17.764899,"MYR":4.204862,"MZN":61.32,"NAD":13.14125,"NGN":361.5,"NIO":30.5605,"NOK":7.883448,"NPR":102.42613,"NZD":1.382906,"OMR":0.385005,"PAB":1,"PEN":3.239447,"PGK":3.265742,"PHP":51.2235,"PKR":106.266105,"PLN":3.598445,"PYG":5683.35,"QAR":3.709991,"RON":3.866304,"RSD":99.953083,"RUB":57.701,"RWF":835,"SAR":3.750363,"SBD":7.689137,"SCR":13.5475,"SDG":6.68,"SEK":8.013378,"SGD":1.350279,"SHP":0.757335,"SLL":7541.125831,"SOS":583.195,"SRD":7.438,"SSP":125.7373,"STD":20543.940257,"SVC":8.821352,"SYP":515,"SZL":13.135,"THB":33.0975,"TJS":8.86905,"TMT":3.499986,"TND":2.442101,"TOP":2.220937,"TRY":3.45842,"TTD":6.839944,"TWD":30.1233,"TZS":2242.4,"UAH":26.302,"UGX":3637.566138,"USD":1,"UYU":28.991788,"UZS":8157.9,"VEF":9.985022,"VND":22721.266789,"VUV":104.695984,"WST":2.506005,"XAF":551.164931,"XAG":0.05632238,"XAU":0.00075455,"XCD":2.70255,"XDR":0.702272,"XOF":551.164931,"XPD":0.00107357,"XPF":100.267962,"XPT":0.00101559,"YER":250.319142,"ZAR":13.1582,"ZMW":9.345,"ZWL":322.355011}}
1+
{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1505430000,"base":"USD","rates":{"AED":3.673014,"AFN":68.630079,"ALL":111.957598,"AMD":477.735313,"ANG":1.777664,"AOA":165.9215,"ARS":16.991,"AUD":1.250112,"AWG":1.795251,"AZN":1.7,"BAM":1.641215,"BBD":2,"BDT":80.583547,"BGN":1.639955,"BHD":0.37724,"BIF":1741.080974,"BMD":1,"BND":1.349501,"BOB":6.955968,"BRL":3.119595,"BSD":1,"BTC":0.000301901034,"BTN":64.047228,"BWP":10.14439,"BYN":1.941982,"BZD":2.01313,"CAD":1.216203,"CDF":1562.881563,"CHF":0.961569,"CLF":0.02319,"CLP":624.2,"CNH":6.543403,"CNY":6.552396,"COP":2899.653333,"CRC":576.621761,"CUC":1,"CUP":25.5,"CVE":92.875,"CZK":21.87455,"DJF":178.76,"DKK":6.242562,"DOP":47.244322,"DZD":111.2945,"EGP":17.645,"ERN":15.337793,"ETB":23.418183,"EUR":0.839009,"FJD":2.025157,"FKP":0.746204,"GBP":0.746204,"GEL":2.459125,"GGP":0.746204,"GHS":4.416734,"GIP":0.746204,"GMD":46.125,"GNF":8992.5,"GTQ":7.283821,"GYD":207.546477,"HKD":7.813011,"HNL":23.389688,"HRK":6.2791,"HTG":62.947328,"HUF":258.805,"IDR":13239.951073,"ILS":3.521225,"IMP":0.746204,"INR":64.1637,"IQD":1164.934957,"IRR":33310,"ISK":105.21,"JEP":0.746204,"JMD":129.903937,"JOD":0.709503,"JPY":109.94437037,"KES":102.959908,"KGS":68.673222,"KHR":4083.333333,"KMF":413.765225,"KPW":900,"KRW":1134.17,"KWD":0.301589,"KYD":0.832258,"KZT":338.941816,"LAK":8303.566667,"LBP":1504.524887,"LKR":152.657899,"LRD":117.074294,"LSL":13.142562,"LYD":1.354936,"MAD":9.364378,"MDL":17.599529,"MGA":2988.444875,"MKD":51.67375,"MMK":1352.674087,"MNT":2449.441941,"MOP":8.03614,"MRO":364.460827,"MUR":33.35,"MVR":15.409873,"MWK":724.675734,"MXN":17.662526,"MYR":4.2065,"MZN":61.732957,"NAD":13.142562,"NGN":361.029651,"NIO":30.28567,"NOK":7.874942,"NPR":102.408065,"NZD":1.383579,"OMR":0.385035,"PAB":1,"PEN":3.238498,"PGK":3.190543,"PHP":51.18,"PKR":105.284982,"PLN":3.590381,"PYG":5678.502124,"QAR":3.705007,"RON":3.86032,"RSD":99.85,"RUB":57.5596,"RWF":830.109566,"SAR":3.7507,"SBD":7.735487,"SCR":13.392938,"SDG":6.668096,"SEK":7.989599,"SGD":1.346466,"SHP":0.746204,"SLL":7541.125831,"SOS":576.617179,"SRD":7.438,"SSP":125.7373,"STD":20527.540843,"SVC":8.737628,"SYP":514.97499,"SZL":13.149654,"THB":33.08,"TJS":8.785895,"TMT":3.504979,"TND":2.439914,"TOP":2.219187,"TRY":3.434374,"TTD":6.737899,"TWD":30.098712,"TZS":2242.7,"UAH":26.131535,"UGX":3590.25,"USD":1,"UYU":29.00675,"UZS":8081.45,"VEF":9.985022,"VND":22719.200123,"VUV":104.382651,"WST":2.483371,"XAF":550.353977,"XAG":0.05608526,"XAU":0.00074986,"XCD":2.70255,"XDR":0.704516,"XOF":550.353977,"XPD":0.00107869,"XPF":100.120433,"XPT":0.00101293,"YER":250.306642,"ZAR":13.131781,"ZMW":9.382882,"ZWL":322.355011}}

__tests__/shared/components/tc-communities/__snapshots__/Header.jsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ exports[`Snapshot match 1`] = `
1616
},
1717
]
1818
}
19+
groupId=""
1920
hideSearch={false}
2021
isMobileOpen={false}
2122
loginUrl="/some/login/url"
@@ -76,6 +77,7 @@ exports[`Snapshot match 2`] = `
7677
]
7778
}
7879
cssUrl="some/css/url"
80+
groupId=""
7981
hideSearch={false}
8082
isMobileOpen={true}
8183
loginUrl="/some/login/url"

src/server/tc-communities/blockchain/metadata.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,10 @@
1717
"img": "/themes/blockchain/logo_topcoder_with_name.svg",
1818
"url": "https://www.topcoder.com"
1919
}],
20-
"menuItems": [
21-
{
22-
"title": "Home",
23-
"url": "."
24-
}, {
25-
"title": "Learn",
26-
"url": "learn"
27-
}
28-
],
20+
"menuItems": [{
21+
"title": "Home",
22+
"url": "."
23+
}],
2924
"leaderboardApiUrl": "https://api.topcoder.com/v4/looks/458/run/json/",
3025
"newsFeed": "http://www.topcoder.com/feed",
3126
"description": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore.",

src/shared/components/tc-communities/Header/index.jsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function Header(props) {
2929
baseUrl,
3030
closeMenu,
3131
communitySelector,
32+
groupId,
3233
openMenu,
3334
openedMenu,
3435
logos,
@@ -118,14 +119,22 @@ function Header(props) {
118119
<div className={theme.authorize}>
119120
<button
120121
onClick={() => {
121-
const url = encodeURIComponent(window.location.href);
122+
let url = encodeURIComponent(
123+
`${window.location.href}?join=${groupId}`,
124+
);
125+
url = encodeURIComponent(
126+
`${config.URL.AUTH}/member?retUrl=${url}`,
127+
);
128+
url = encodeURIComponent(url);
122129
window.location = `${config.URL.AUTH}/member/registration?retUrl=${url}`;
123130
}}
124131
className={theme.btnRegister}
125132
>Register</button>
126133
<button
127134
onClick={() => {
128-
const url = encodeURIComponent(window.location.href);
135+
const url = encodeURIComponent(
136+
`${window.location.href}?join=${groupId}`,
137+
);
129138
window.location = `${config.URL.AUTH}/member?retUrl=${url}`;
130139
}}
131140
className={theme.btnLogin}
@@ -219,6 +228,7 @@ function Header(props) {
219228
Header.defaultProps = {
220229
activeTrigger: null,
221230
baseUrl: '',
231+
groupId: '',
222232
menuItems: [],
223233
openedMenu: null,
224234
logos: [],
@@ -234,6 +244,7 @@ Header.propTypes = {
234244
baseUrl: PT.string,
235245
closeMenu: PT.func.isRequired,
236246
communitySelector: PT.arrayOf(PT.shape()).isRequired,
247+
groupId: PT.string,
237248
menuItems: PT.arrayOf(PT.shape({
238249
title: PT.string.isRequired,
239250
url: PT.string.isRequired,

src/shared/components/tc-communities/JoinCommunity/ConfirmModal/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default function ConfirmModal({
6262
url = encodeURIComponent(
6363
`${config.URL.AUTH}/member?retUrl=${url}`,
6464
);
65+
url = encodeURIComponent(url);
6566
window.location = `${config.URL.AUTH}/member/registration?retUrl=${url}`;
6667
}}
6768
styleName="btnConfirmLong"

src/shared/components/tc-communities/communities/blockchain/Home/index.jsx

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@ import React from 'react';
1010
import Section from 'components/tc-communities/Section';
1111
import Banner from 'components/tc-communities/Banner';
1212
import ImageText from 'components/tc-communities/ImageText';
13-
import ResourceCard from 'components/tc-communities/ResourceCard';
14-
import NewsSection from 'components/tc-communities/NewsSection';
15-
import PT from 'prop-types';
13+
// import ResourceCard from 'components/tc-communities/ResourceCard';
14+
// import NewsSection from 'components/tc-communities/NewsSection';
15+
// import PT from 'prop-types';
1616

1717
import JoinCommunity from 'containers/tc-communities/JoinCommunity';
1818

19-
import IconRocket from '../../../../../../assets/images/tc-communities/rocket.svg';
20-
import IconNetwork from '../../../../../../assets/images/tc-communities/network.svg';
21-
import IconMedal from '../../../../../../assets/images/tc-communities/medal.svg';
19+
// import IconRocket from '../../../../../../assets/images/tc-communities/rocket.svg';
20+
// import IconNetwork from '../../../../../../assets/images/tc-communities/network.svg';
21+
// import IconMedal from '../../../../../../assets/images/tc-communities/medal.svg';
2222

2323
import style from './style.scss';
2424

25-
export default function Home(props) {
25+
export default function Home(/* props */) {
2626
return (
2727
<main>
2828
<Banner
2929
title="Topcoder Blockchain Community"
30-
text="Blockchain community starts here"
30+
text="Learn about and build the next great decentralized application on the Ethereum Blockchain."
3131
imageSrc="/themes/blockchain/home/banner.png"
3232
>
3333
<JoinCommunity
@@ -41,8 +41,9 @@ export default function Home(props) {
4141
}}
4242
>
4343
<div>
44-
<h1>Build unstoppable applications with Ethereum</h1>
45-
<p>Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third party interference. orem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitationorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
44+
<h1>Build Trustworthy, Unstoppable, Decentralized Applications with Ethereum</h1>
45+
<p>Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third party interference.</p>
46+
<p>Ethereum joins the security of blockchain technology with the expressiveness and objectivity of coded applications. With a distributed ledger on Ethereum, companies and individuals gain real-time transparency into transactions, costs, and security which in turn builds trust.</p>
4647
</div>
4748
</Section>
4849

@@ -54,25 +55,18 @@ export default function Home(props) {
5455
<div>
5556
<ImageText
5657
title="Ramp Up"
57-
text="Learn about what we're working on, our environments, procedures, etc. If you want to get involved in Topcoder projects, this is a good place to start. We run challenges and tasks constantly, so we're always looking for help."
58-
link={{
59-
title: 'Start Learning',
60-
url: 'learn',
61-
}}
58+
text="Looking to get involved in Topcoder projects being built on Ethereum? Then this is the best place to start. Learn everything you need to know about mastering the Ethereum blockchain from the industry leader, ConsenSys."
6259
imageSrc="/themes/blockchain/home/image-text-learn.png"
6360
/>
6461
<ImageText
6562
title="Get Involved"
66-
text="Whether you're a copilot, designer, developer, or data scientist...we want you involved. Topcoder is one of the biggest customers of our own platform, so there is never a shortage of interesting things to work on."
67-
link={{
68-
title: 'Start Contributing',
69-
url: 'challenges',
70-
}}
63+
text="The Ethereum blockchain is the ideal platform for businesses and developers. In partnering with ConsenSys, we have given our community the ability to be at the forefront of this cutting edge technology. So what are you waiting for? Start building on the Ethereum Blockchain today! "
7164
imageSrc="/themes/blockchain/home/image-text-do.jpg"
7265
/>
7366
</div>
7467
</Section>
7568

69+
{/*
7670
<Section
7771
theme={{
7872
container: style.resourcesContainer,
@@ -108,16 +102,18 @@ export default function Home(props) {
108102
</Section>
109103
110104
<NewsSection news={props.news} />
105+
*/}
111106

112107
</main>
113108
);
114109
}
115110

111+
/*
116112
Home.defaultProps = {
117113
news: [],
118114
};
119115
120116
Home.propTypes = {
121117
news: PT.arrayOf(PT.shape()),
122118
};
123-
119+
*/

src/shared/components/tc-communities/communities/blockchain/Home/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
p {
8383
color: #394146;
8484
font: 15px/22px 'roboto';
85+
padding: 6px 0;
8586
}
8687
}
8788

src/shared/containers/tc-communities/Header.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function mapStateToProps(state, ownProps) {
2222
chevronOverAvatar: meta.chevronOverAvatar,
2323
communityId: meta.communityId,
2424
communitySelector: meta.communitySelector,
25+
groupId: meta.groupId,
2526
hideSearch: meta.hideSearch,
2627
isMobileOpen: meta.isMobileOpen,
2728
logos: meta.logos,

src/shared/reducers/tc-communities/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import config from 'utils/config';
1010
import logger from 'utils/logger';
1111
import { handleActions } from 'redux-actions';
1212
import { decodeToken, isTokenExpired } from 'tc-accounts';
13+
import { isClientSide } from 'utils/isomorphy';
1314
import { combine, resolveReducers, toFSA } from 'utils/redux';
1415
import { STATE as JOIN_COMMUNITY } from 'components/tc-communities/JoinCommunity';
1516

@@ -23,7 +24,9 @@ function onJoinDone(state, action) {
2324
/* NOTE: Using alert is, probably, not a best practice, but will work just
2425
* fine for now. Anyway, if everything works fine, users are not supposed
2526
* to see it normally. */
26-
alert('Failed to join the group!'); // eslint-disable-line no-alert
27+
if (isClientSide()) {
28+
alert('Failed to join the group!'); // eslint-disable-line no-alert
29+
}
2730

2831
return { ...state, joinCommunityButton: JOIN_COMMUNITY.DEFAULT };
2932
}

src/shared/services/groups.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ class GroupService {
2525
addMember(groupId, memberId, membershipType) {
2626
return this.private.api.postJson(`/groups/${groupId}/members`, {
2727
param: { memberId, membershipType },
28-
}).then(res => (res.ok ? res.json() : new Error(res.statusText)))
29-
.then(res => (
30-
res.result.status === 200
31-
? res.result.content
32-
: new Error(res.result.content)
33-
));
28+
}).then((res) => {
29+
if (!res.ok) throw new Error(res.statusText);
30+
return res.json();
31+
}).then((res) => {
32+
if (res.result.status !== 200) throw new Error(res.result.content);
33+
return res.result.content;
34+
});
3435
}
3536

3637
/**

0 commit comments

Comments
 (0)