Skip to content

Commit a18e681

Browse files
Ni-2alsakhaev
authored andcommitted
feat: user can delete Telegram subscription
1 parent 47773a3 commit a18e681

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

apps/xen-tg-app/src/components/NewsSource.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,7 @@ export const Subscription: FC<{ subscription: TSubscription }> = ({ subscription
214214

215215
return (
216216
<div className="flex w-full items-center justify-between gap-3.5 rounded-[10px] bg-(--color-light-white-bg) px-2.5 py-1.5">
217-
<img
218-
src={subscription.source === 'telegram' ? TelegramIcon : RedditIcon}
219-
alt={subscription.source === 'telegram' ? 'Telegram icon' : 'Reddit icon'}
220-
/>
217+
<img src={getIcon(subscription.source)} alt="Source icon" />
221218

222219
<div className="flex flex-1 flex-col gap-0.5 overflow-hidden">
223220
<div className="flex py-0.25 text-[14px]/[100%] font-semibold wrap-anywhere">
@@ -244,9 +241,6 @@ export const Subscription: FC<{ subscription: TSubscription }> = ({ subscription
244241
</button>
245242

246243
<button
247-
style={{
248-
visibility: subscription.source === 'telegram' ? 'hidden' : 'visible',
249-
}}
250244
className="mr-1 flex w-8 cursor-pointer items-center justify-center py-1.5 text-(--color-gray-text) transition hover:text-(--color-main-text)"
251245
onClick={onRemove}
252246
>

0 commit comments

Comments
 (0)