diff --git a/packages/shared/src/components/feeds/FeedNav.tsx b/packages/shared/src/components/feeds/FeedNav.tsx index 0de4e9122c..7de5759417 100644 --- a/packages/shared/src/components/feeds/FeedNav.tsx +++ b/packages/shared/src/components/feeds/FeedNav.tsx @@ -28,6 +28,7 @@ import { useScrollTopClassName } from '../../hooks/useScrollTopClassName'; import { useFeatureTheme } from '../../hooks/utils/useFeatureTheme'; import { webappUrl } from '../../lib/constants'; import NotificationsBell from '../notifications/NotificationsBell'; +import { GivebackGiftEntry } from '../../features/giveback/components/GivebackGiftEntry'; import classed from '../../lib/classed'; import type { AllFeedPages } from '../../lib/query'; import { OtherFeedPage } from '../../lib/query'; @@ -66,6 +67,10 @@ function FeedNav(): ReactElement | null { const { home, bookmarks } = useActiveNav(feedName); const isMobile = useViewSize(ViewSize.MobileL); const isBelowLaptop = !useViewSize(ViewSize.Laptop); + // Phones get the giveback entry via MobileFeedActions and laptop+ via the + // header/rail; the tablet feed header is the only gap, so it renders its own. + // JS-gated (not CSS) so it never mounts alongside the other placements. + const isTablet = isBelowLaptop && !isMobile; const { value: feedChipsVariant } = useConditionalFeature({ feature: featureFeedChips, shouldEvaluate: isBelowLaptop, @@ -167,7 +172,7 @@ function FeedNav(): ReactElement | null { tabListProps={{ className: { indicator: '!w-6', - item: 'px-1 tablet:last-of-type:mr-12', + item: 'px-1 tablet:last-of-type:mr-24', }, autoScrollActive: true, }} @@ -218,7 +223,8 @@ function FeedNav(): ReactElement | null { )} -
+
+ {isTablet && }
diff --git a/packages/shared/src/components/feeds/MobileFeedActions.tsx b/packages/shared/src/components/feeds/MobileFeedActions.tsx index 8b34003e65..edc7e95cd5 100644 --- a/packages/shared/src/components/feeds/MobileFeedActions.tsx +++ b/packages/shared/src/components/feeds/MobileFeedActions.tsx @@ -4,7 +4,6 @@ import dynamic from 'next/dynamic'; import { useRouter } from 'next/router'; import Link from '../utilities/Link'; import { ReadingStreakButton } from '../streak/ReadingStreakButton'; -import { Divider } from '../utilities'; import { useReadingStreak } from '../../hooks/streaks'; import { ButtonIconPosition, ButtonVariant } from '../buttons/common'; import { useAuthContext } from '../../contexts/AuthContext'; @@ -16,6 +15,7 @@ import { Button } from '../buttons/Button'; import { SettingsIcon } from '../icons'; import { RootPortal } from '../tooltips/Portal'; import { QuestHeaderButton } from '../header/QuestHeaderButton'; +import { GivebackGiftEntry } from '../../features/giveback/components/GivebackGiftEntry'; const ProfileSettingsMenuMobile = dynamic( () => @@ -37,7 +37,7 @@ export function MobileFeedActions(): ReactElement { position={LogoPosition.Relative} onLogoClick={() => router.push('/')} /> - + {isStreaksEnabled && streak && ( )} - + {user && ( <>