From 85c59025594528d6e64bfaf913fdd2bd8ab5ea4b Mon Sep 17 00:00:00 2001
From: Dmytro <98233552+DmytroAlipov@users.noreply.github.com>
Date: Thu, 21 Sep 2023 11:28:45 +0300
Subject: [PATCH] feat: add toggling for the hardcode support link (for master)
(#864)
* feat: add toggling for the hardcode support link (master)
Add a toggling mechanism for the "unlink all social media
accounts" text to show it as a link or text depending on
the MFE env setting.
* fix(deps): update dependency @edx/frontend-platform to v5.3.0
* Revert "fix(deps): update dependency @edx/frontend-platform to v5.3.0" (#870)
This reverts commit 757e446be7a90bf32684263f89915a591e012f60.
* feat: add toggling for the hardcode support link (master)
Add a toggling mechanism for the "unlink all social media
accounts" text to show it as a link or text depending on
the MFE env setting.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Abdullah Waheed <42172960+abdullahwaheed@users.noreply.github.com>
---
.env | 1 +
.env.development | 1 +
.env.test | 1 +
.../delete-account/BeforeProceedingBanner.jsx | 4 +-
.../BeforeProceedingBanner.test.jsx | 48 +++++++++++++
.../delete-account/DeleteAccount.jsx | 3 +-
.../BeforeProceedingBanner.test.jsx.snap | 68 +++++++++++++++++++
7 files changed, 124 insertions(+), 2 deletions(-)
create mode 100644 src/account-settings/delete-account/BeforeProceedingBanner.test.jsx
create mode 100644 src/account-settings/delete-account/__snapshots__/BeforeProceedingBanner.test.jsx.snap
diff --git a/.env b/.env
index d245341..ff90ec6 100644
--- a/.env
+++ b/.env
@@ -33,3 +33,4 @@ APP_ID=
MFE_CONFIG_API_URL=
PASSWORD_RESET_SUPPORT_LINK=''
LEARNER_FEEDBACK_URL=''
+SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT='https://support.edx.org/hc/en-us/articles/207206067'
diff --git a/.env.development b/.env.development
index b2f1e38..522910d 100644
--- a/.env.development
+++ b/.env.development
@@ -34,3 +34,4 @@ APP_ID=
MFE_CONFIG_API_URL=
PASSWORD_RESET_SUPPORT_LINK='mailto:support@example.com'
LEARNER_FEEDBACK_URL=''
+SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT='https://support.edx.org/hc/en-us/articles/207206067'
diff --git a/.env.test b/.env.test
index 4be694b..e05bbcd 100644
--- a/.env.test
+++ b/.env.test
@@ -32,3 +32,4 @@ MARKETING_EMAILS_OPT_IN=''
APP_ID=
MFE_CONFIG_API_URL=
LEARNER_FEEDBACK_URL=''
+SUPPORT_URL_TO_UNLINK_SOCIAL_MEDIA_ACCOUNT='https://support.edx.org/hc/en-us/articles/207206067'
diff --git a/src/account-settings/delete-account/BeforeProceedingBanner.jsx b/src/account-settings/delete-account/BeforeProceedingBanner.jsx
index 6f05132..36eb748 100644
--- a/src/account-settings/delete-account/BeforeProceedingBanner.jsx
+++ b/src/account-settings/delete-account/BeforeProceedingBanner.jsx
@@ -25,10 +25,12 @@ const BeforeProceedingBanner = (props) => {
defaultMessage="Before proceeding, please {actionLink}."
description="Error that appears if you are trying to delete your account, but something about your account needs attention first. The actionLink will be instructions, such as 'unlink your Facebook account'."
values={{
- actionLink: (
+ actionLink: supportArticleUrl ? (