From 372e20efa36c52a04cf2aa48816b82a1d96e0711 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 22:40:25 +0300 Subject: ALF saved feeds screen (#8844) --- src/screens/Feeds/NoSavedFeedsOfAnyType.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/screens/Feeds/NoSavedFeedsOfAnyType.tsx') diff --git a/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx b/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx index 8f6bd9d2e..db0ed1a7d 100644 --- a/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx +++ b/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {TID} from '@atproto/common-web' import {msg, Trans} from '@lingui/macro' @@ -16,20 +15,25 @@ import {Text} from '#/components/Typography' * feeds if pressed. It should only be presented to the user if they actually * have no other feeds saved. */ -export function NoSavedFeedsOfAnyType() { +export function NoSavedFeedsOfAnyType({ + onAddRecommendedFeeds, +}: { + onAddRecommendedFeeds?: () => void +}) { const t = useTheme() const {_} = useLingui() const {isPending, mutateAsync: overwriteSavedFeeds} = useOverwriteSavedFeedsMutation() - const addRecommendedFeeds = React.useCallback(async () => { + const addRecommendedFeeds = async () => { + onAddRecommendedFeeds?.() await overwriteSavedFeeds( RECOMMENDED_SAVED_FEEDS.map(f => ({ ...f, id: TID.nextStr(), })), ) - }, [overwriteSavedFeeds]) + } return ( - + {_(msg`Use recommended`)} -- cgit 1.4.1