From 0517768cd32c96e96eb6ff80b23c3a8db284dfa0 Mon Sep 17 00:00:00 2001
From: Caidan Williams <caidan@internet.dev>
Date: Fri, 22 Aug 2025 17:08:47 -0700
Subject: feat: add data-nosnippet attribute to Discover feed for SEO control

---
 src/view/com/feeds/FeedPage.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/view/com/feeds/FeedPage.tsx')

diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx
index 9f28743a1..0e7813b7c 100644
--- a/src/view/com/feeds/FeedPage.tsx
+++ b/src/view/com/feeds/FeedPage.tsx
@@ -6,7 +6,7 @@ import {useLingui} from '@lingui/react'
 import {type NavigationProp, useNavigation} from '@react-navigation/native'
 import {useQueryClient} from '@tanstack/react-query'
 
-import {VIDEO_FEED_URIS} from '#/lib/constants'
+import {DISCOVER_FEED_URI, VIDEO_FEED_URIS} from '#/lib/constants'
 import {useOpenComposer} from '#/lib/hooks/useOpenComposer'
 import {ComposeIcon2} from '#/lib/icons'
 import {getRootNavigation, getTabState, TabState} from '#/lib/routes/helpers'
@@ -73,6 +73,10 @@ export function FeedPage({
     return isNative && _isVideoFeed
   }, [feedInfo])
 
+  const isDiscoverFeed = useMemo(() => {
+    return feedInfo.uri === DISCOVER_FEED_URI
+  }, [feedInfo.uri])
+
   useEffect(() => {
     if (isPageFocused) {
       setHomeBadge(hasNew)
@@ -128,7 +132,7 @@ export function FeedPage({
 
   const shouldPrefetch = isNative && isPageAdjacent
   return (
-    <View testID={testID}>
+    <View testID={testID} {...(isDiscoverFeed && {'data-nosnippet': true})}>
       <MainScrollProvider>
         <FeedFeedbackProvider value={feedFeedback}>
           <PostFeed
-- 
cgit 1.4.1

