diff --git a/public/locales/en.json b/public/locales/en.json index ced63d15..6eae0d87 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -394,7 +394,6 @@ "explore_cta": "Find a community", "pick_channel_title": "Pick a channel", "pick_channel_desc": "Choose a channel from the list on the left to start reading.", - "badge_new": "New", "root_category": "Channels" }, "Call": { diff --git a/public/locales/ru.json b/public/locales/ru.json index d46b754d..5c40fa2a 100644 --- a/public/locales/ru.json +++ b/public/locales/ru.json @@ -396,7 +396,6 @@ "explore_cta": "Найти сообщество", "pick_channel_title": "Выберите канал", "pick_channel_desc": "Откройте канал из списка слева, чтобы начать читать.", - "badge_new": "Новое", "root_category": "Каналы" }, "Call": { diff --git a/src/app/pages/client/direct/DirectStreamHeader.tsx b/src/app/pages/client/direct/DirectStreamHeader.tsx index 4be938d5..d1c9c086 100644 --- a/src/app/pages/client/direct/DirectStreamHeader.tsx +++ b/src/app/pages/client/direct/DirectStreamHeader.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, useEffect, useState } from 'react'; +import React, { forwardRef } from 'react'; import { useTranslation } from 'react-i18next'; import { useMatch, useNavigate } from 'react-router-dom'; import { Box, color, toRem } from 'folds'; @@ -7,17 +7,14 @@ import { BOTS_PATH, CHANNELS_PATH, DIRECT_PATH } from '../../paths'; import { isNativePlatform } from '../../../utils/capacitor'; import { useBotPresets } from '../../../features/bots/catalog'; -const CHANNELS_TOOLTIP_SEEN_KEY = 'vojo.channelsTooltipSeen'; - type SegmentProps = { active: boolean; disabled?: boolean; label: string; - badge?: string; onClick?: () => void; }; const Segment = forwardRef( - ({ active, disabled, label, badge, onClick }, ref) => ( + ({ active, disabled, label, onClick }, ref) => ( ) ); @@ -74,41 +51,8 @@ export function DirectStreamHeader() { const channelsMatch = useMatch({ path: CHANNELS_PATH, caseSensitive: true, end: false }); const showBotsSegment = bots.length > 0 || !!botsMatch; - // Migration "NEW" badge — one-shot promo for the new Channels surface. - // Replaces the old "Coming soon" disabled state. Hidden once the user has - // visited /channels/* or already saw it in a prior session (persisted in - // localStorage). Visible default until first interaction. - const [showBadge, setShowBadge] = useState(false); - useEffect(() => { - if (channelsMatch) { - try { - localStorage.setItem(CHANNELS_TOOLTIP_SEEN_KEY, '1'); - } catch { - /* private mode — non-fatal, badge just keeps showing */ - } - setShowBadge(false); - return; - } - try { - if (localStorage.getItem(CHANNELS_TOOLTIP_SEEN_KEY) === '1') return; - } catch { - return; - } - setShowBadge(true); - }, [channelsMatch]); - const navOpts = { replace: isNativePlatform() }; - const handleChannelsClick = () => { - setShowBadge(false); - try { - localStorage.setItem(CHANNELS_TOOLTIP_SEEN_KEY, '1'); - } catch { - /* private mode */ - } - navigate(CHANNELS_PATH, navOpts); - }; - return ( @@ -120,8 +64,7 @@ export function DirectStreamHeader() { navigate(CHANNELS_PATH, navOpts)} /> {showBotsSegment && (