+ Challenge Pipeline page."
+ value="Pipeline"
+ />
+ Gig Work page."
+ value="Gig Work"
+ />
+
+
+
+ Topcoder Open you should definitely be subscribing to this one. Expect an update in your mailbox every Tuesday!"
+ value="TCO Tuesdays"
+ />
+
`
diff --git a/src/server/tc-communities/wipro/metadata.json b/src/server/tc-communities/wipro/metadata.json
index 451de9ff9e..fed156fca6 100644
--- a/src/server/tc-communities/wipro/metadata.json
+++ b/src/server/tc-communities/wipro/metadata.json
@@ -42,7 +42,7 @@
"url": "/leaderboard"
}, {
"title": "FAQ",
- "url": "/faq"
+ "url": "https://topgear-app.wipro.com/faq-categories"
}
],
"newsFeed": "http://www.topcoder.com/feed",
diff --git a/src/shared/actions/newsletterPreferences.js b/src/shared/actions/newsletterPreferences.js
new file mode 100644
index 0000000000..40a415c34a
--- /dev/null
+++ b/src/shared/actions/newsletterPreferences.js
@@ -0,0 +1,104 @@
+/**
+ * Actions for the Newsletter preference container.
+ */
+
+/* global fetch */
+import _ from 'lodash';
+import { createActions } from 'redux-actions';
+import { config } from 'topcoder-react-utils';
+
+const PROXY_ENDPOINT = `${config.URL.COMMUNITY_APP}/api/mailchimp`;
+
+// Fetching member's newsletter preferences init
+function fetchDataInit(email) {
+ return email;
+}
+
+// Fetching member's newsletter preferences
+async function fetchDataDone(emailHash, listId = config.NEWSLETTER_SIGNUP.DEFAUL_LIST_ID) {
+ /* NOTE: In the real life in most cases you don't want to use fetch() directly
+ * in an action. You want to create a service for your calls and use it here.
+ * However, in this example, to keep it a bit more compact, we use fetch()
+ * directly here. */
+ try {
+ let error = false;
+ const subs = await fetch(`${PROXY_ENDPOINT}/${listId}/members/${emailHash}`, {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ })
+ .then((result) => {
+ if (result.status !== 200) error = true;
+ return result.json();
+ });
+
+ return {
+ email: emailHash,
+ preferences: subs.tags,
+ error,
+ };
+ } catch (error) {
+ return {
+ email: emailHash,
+ error,
+ };
+ }
+}
+
+// Updates member newsletter subscription
+async function updateSubscriptionsDone(
+ emailHash, tagId, status, listId = config.NEWSLETTER_SIGNUP.DEFAUL_LIST_ID,
+) {
+ /* NOTE: In the real life in most cases you don't want to use fetch() directly
+ * in an action. You want to create a service for your calls and use it here.
+ * However, in this example, to keep it a bit more compact, we use fetch()
+ * directly here. */
+ try {
+ let error = false;
+ const fetchUrl = `${PROXY_ENDPOINT}/${listId}/members/${emailHash}/tags`;
+
+ const data = {
+ tags: [
+ { name: tagId, status: status ? 'active' : 'inactive' },
+ ],
+ };
+
+ const formData = JSON.stringify(data);
+ // use proxy for avoid 'Access-Control-Allow-Origin' bug
+ await fetch(fetchUrl, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: formData,
+ })
+ .then((result) => {
+ if (!result.ok) error = true;
+ return result.json();
+ });
+
+ return {
+ id: tagId,
+ checked: status,
+ email: emailHash,
+ error,
+ };
+ } catch (error) {
+ return {
+ id: tagId,
+ checked: status,
+ email: emailHash,
+ error,
+ };
+ }
+}
+
+export default createActions({
+ NEWSLETTER_PREFERENCES: {
+ FETCH_DATA_INIT: fetchDataInit,
+ FETCH_DATA_DONE: fetchDataDone,
+ UPDATE_TAG_INIT: _.identity,
+ UPDATE_TAG_DONE: updateSubscriptionsDone,
+ },
+});
diff --git a/src/shared/components/Contentful/Tabs/themes/underline.scss b/src/shared/components/Contentful/Tabs/themes/underline.scss
index 2ea6d8a19b..9c014b07d6 100644
--- a/src/shared/components/Contentful/Tabs/themes/underline.scss
+++ b/src/shared/components/Contentful/Tabs/themes/underline.scss
@@ -48,7 +48,8 @@ $text-color-pannel: #4a4a4a;
&:hover,
&.selected {
- border-bottom: 5px solid #229174;
+ border-bottom: 5px solid #43d7b0;
+ border-radius: 3px;
}
p {
diff --git a/src/shared/components/Countdown/themes/TCO21.scss b/src/shared/components/Countdown/themes/TCO21.scss
index 01abb24ba4..4304871079 100644
--- a/src/shared/components/Countdown/themes/TCO21.scss
+++ b/src/shared/components/Countdown/themes/TCO21.scss
@@ -56,6 +56,7 @@ $container-background-yello: #fce217;
.time-label {
color: #2a2a2a;
font-size: 14px;
+ font-weight: 500;
letter-spacing: 0.5px;
line-height: 18px;
text-align: center;
diff --git a/src/shared/components/NewsletterSignupForMembers/ConfirmModal/index.jsx b/src/shared/components/NewsletterSignupForMembers/ConfirmModal/index.jsx
index 1329dfcb53..68c49a979e 100644
--- a/src/shared/components/NewsletterSignupForMembers/ConfirmModal/index.jsx
+++ b/src/shared/components/NewsletterSignupForMembers/ConfirmModal/index.jsx
@@ -34,13 +34,15 @@ function ConfirmModal({
skipConfirmSignup,
token,
theme,
+ title,
+ desc,
}) {
let text;
if (token) {
text = (
-
Sign up for the Topcoder Newsletter
-
Do you want to subscribe to this newsletter?
+
{title}
+
{desc}
);
if (skipConfirmSignup) {
@@ -49,7 +51,7 @@ function ConfirmModal({
} else {
text = customTcAuthModalText || (
-
Sign up for the Topcoder Newsletter
+
{title}
You must be a Topcoder member before you can signup for Newsletter.
To signup, login if you are already a member. If not, register first.
@@ -84,7 +86,7 @@ function ConfirmModal({
button: buttonThemes.tc['primary-green-md'],
}}
>
- SIGNUP
+ Ok