diff --git a/src/components/Feed.tsx b/src/components/Feed.tsx index 17b3d685..8161f05f 100644 --- a/src/components/Feed.tsx +++ b/src/components/Feed.tsx @@ -327,10 +327,11 @@ export function Feed({ kinds, tagFilters, header, hideCompose, emptyMessage, fee message={ emptyMessage ?? ( activeTab === 'follows' - ? 'No posts yet. Follow some people to see their content here.' + ? 'Your feed is empty. Follow some people to see their posts here.' : 'No posts found. Check your relay connections or come back soon.' ) } + showDiscover={!emptyMessage && activeTab === 'follows'} onSwitchToGlobal={ activeTab === 'follows' && showGlobalFeed ? () => handleSetActiveTab('global') diff --git a/src/components/FeedEmptyState.tsx b/src/components/FeedEmptyState.tsx index e55f845c..3ded87a4 100644 --- a/src/components/FeedEmptyState.tsx +++ b/src/components/FeedEmptyState.tsx @@ -1,3 +1,6 @@ +import { Link } from 'react-router-dom'; +import { Users } from 'lucide-react'; +import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; interface FeedEmptyStateProps { @@ -5,31 +8,45 @@ interface FeedEmptyStateProps { message: string; /** Called when the user clicks "Switch to Global". Omit to hide the button. */ onSwitchToGlobal?: () => void; + /** Show a "Discover people" link to /packs. */ + showDiscover?: boolean; className?: string; } /** * Consistent empty state for Follows/Global feed tabs across all feed pages. * - * - Follows tab: pass `onSwitchToGlobal` to render a "Switch to Global" CTA. - * - Global tab: omit `onSwitchToGlobal`; the message should guide the user + * - Follows tab: pass `onSwitchToGlobal` and `showDiscover` to render CTAs. + * - Global tab: omit both; the message should guide the user * to check their relay connections. */ export function FeedEmptyState({ message, onSwitchToGlobal, + showDiscover, className, }: FeedEmptyStateProps) { return ( -
-

{message}

- {onSwitchToGlobal && ( - +
+
+ +
+ +

{message}

+ + {(showDiscover || onSwitchToGlobal) && ( +
+ {showDiscover && ( + + )} + {onSwitchToGlobal && ( + + )} +
)}
);