From a7d825052e3bda843b59f14d606b34c5d5f69eee Mon Sep 17 00:00:00 2001
From: KishenKumarrrrr <kishen@open.gov.sg>
Date: Wed, 3 Jan 2024 17:35:16 +0800
Subject: [PATCH] feat: remove telegram campaign creation in fe

---
 .../create/create-modal/CreateModal.tsx       | 27 ---------------
 .../DuplicateCampaignModal.tsx                | 26 ---------------
 .../create-demo-modal/CreateDemoModal.tsx     | 33 +++----------------
 3 files changed, 4 insertions(+), 82 deletions(-)

diff --git a/frontend/src/components/dashboard/create/create-modal/CreateModal.tsx b/frontend/src/components/dashboard/create/create-modal/CreateModal.tsx
index a97fc6175..fe2d69b03 100644
--- a/frontend/src/components/dashboard/create/create-modal/CreateModal.tsx
+++ b/frontend/src/components/dashboard/create/create-modal/CreateModal.tsx
@@ -165,33 +165,6 @@ const CreateModal = ({
                 </p>
               )}
             </div>
-
-            <div className={styles.channelContainer}>
-              <input
-                type="radio"
-                aria-label={ChannelType.Telegram}
-                id={ChannelType.Telegram}
-                value={ChannelType.Telegram}
-                checked={selectedChannel === ChannelType.Telegram}
-                onChange={() => setSelectedChannel(ChannelType.Telegram)}
-              />
-              <label htmlFor={ChannelType.Telegram} className={styles.subtext}>
-                Telegram
-              </label>
-              {selectedChannel === ChannelType.Telegram && (
-                <p className={styles.infotext}>
-                  Set up your Telegram Bot. &nbsp;
-                  <OutboundLink
-                    className={styles.link}
-                    eventLabel="https://go.gov.sg/postman-telegram"
-                    to="https://go.gov.sg/postman-telegram"
-                    target="_blank"
-                  >
-                    Learn more.
-                  </OutboundLink>
-                </p>
-              )}
-            </div>
             {canAccessGovsg && (
               <div className={styles.channelContainer}>
                 <input
diff --git a/frontend/src/components/dashboard/create/duplicate-campaign-modal/DuplicateCampaignModal.tsx b/frontend/src/components/dashboard/create/duplicate-campaign-modal/DuplicateCampaignModal.tsx
index cdbf7dd5a..f39f2b77a 100644
--- a/frontend/src/components/dashboard/create/duplicate-campaign-modal/DuplicateCampaignModal.tsx
+++ b/frontend/src/components/dashboard/create/duplicate-campaign-modal/DuplicateCampaignModal.tsx
@@ -162,32 +162,6 @@ const DuplicateCampaignModal = ({ campaign }: { campaign: Campaign }) => {
                 </p>
               )}
             </div>
-            <div className={styles.channelContainer}>
-              <input
-                type="radio"
-                aria-label={ChannelType.Telegram}
-                id={ChannelType.Telegram}
-                value={ChannelType.Telegram}
-                checked={campaign.type === ChannelType.Telegram}
-                disabled={true}
-              />
-              <label htmlFor={ChannelType.Telegram} className={styles.subtext}>
-                Telegram
-              </label>
-              {campaign.type === ChannelType.Telegram && (
-                <p className={styles.infotext}>
-                  Set up your Telegram Bot. &nbsp;
-                  <OutboundLink
-                    className={styles.link}
-                    eventLabel="https://go.gov.sg/postman-telegram"
-                    to="https://go.gov.sg/postman-telegram"
-                    target="_blank"
-                  >
-                    Learn more.
-                  </OutboundLink>
-                </p>
-              )}
-            </div>
             {canAccessGovsg && (
               <div className={styles.channelContainer}>
                 <input
diff --git a/frontend/src/components/dashboard/demo/create-demo-modal/CreateDemoModal.tsx b/frontend/src/components/dashboard/demo/create-demo-modal/CreateDemoModal.tsx
index 4db93c45e..3c418f715 100644
--- a/frontend/src/components/dashboard/demo/create-demo-modal/CreateDemoModal.tsx
+++ b/frontend/src/components/dashboard/demo/create-demo-modal/CreateDemoModal.tsx
@@ -123,10 +123,10 @@ const CreateDemoModal = ({
             Choose the channel you want to send in
           </h2>
           <h5 className={styles.subtitle}>
-            Demo campaigns are for SMS and Telegram channels only, as the Email
-            channel is already free. You may send messages to at most 20
-            recipients in each campaign. One try will be used up only after a
-            demo campaign has been sent, otherwise, it will stay as a draft.
+            Demo campaigns are for SMS channels only, as the Email channel is
+            already free. You may send messages to at most 20 recipients in each
+            campaign. One try will be used up only after a demo campaign has
+            been sent, otherwise, it will stay as a draft.
           </h5>
         </div>
 
@@ -151,31 +151,6 @@ const CreateDemoModal = ({
               ></i>
             </PrimaryButton>
           </div>
-          <div className={styles.channelContainer}>
-            <PrimaryButton
-              className={cx(styles.button, {
-                [styles.active]: selectedChannel === ChannelType.Telegram,
-              })}
-              disabled={
-                duplicateCampaign &&
-                duplicateCampaign.type !== ChannelType.Telegram
-              }
-              onClick={
-                selectedChannel === ChannelType.Telegram
-                  ? undefined
-                  : () => setSelectedChannel(ChannelType.Telegram)
-              }
-            >
-              Telegram
-              <i
-                className={cx(
-                  'bx',
-                  styles.icon,
-                  channelIcons[ChannelType.Telegram]
-                )}
-              ></i>
-            </PrimaryButton>
-          </div>
         </div>
         <div className="separator"></div>
         <div className={styles.actions}>