Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove telegram campaign creation in fe #2239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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}>
Expand Down
Loading