about summary refs log tree commit diff
path: root/src/screens/Feeds/NoSavedFeedsOfAnyType.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/Feeds/NoSavedFeedsOfAnyType.tsx')
-rw-r--r--src/screens/Feeds/NoSavedFeedsOfAnyType.tsx17
1 files changed, 10 insertions, 7 deletions
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 (
     <View
@@ -46,10 +50,9 @@ export function NoSavedFeedsOfAnyType() {
         disabled={isPending}
         label={_(msg`Apply default recommended feeds`)}
         size="small"
-        variant="solid"
-        color="primary"
+        color="primary_subtle"
         onPress={addRecommendedFeeds}>
-        <ButtonIcon icon={Plus} position="left" />
+        <ButtonIcon icon={Plus} />
         <ButtonText>{_(msg`Use recommended`)}</ButtonText>
       </Button>
     </View>