ai1ywm5xi: Add the Discover sheet with featured, trending, find experts panels and the appearance switch

This commit is contained in:
2026-10-20 08:49:11 -06:00
parent 695ebe1095
commit cfdca1f270
10 changed files with 307 additions and 10 deletions
+9 -1
View File
@@ -6,7 +6,8 @@ import { applyLikeOutcome, LikeError, sendLike } from "@/lib/like-client";
import { firstLoadFailure, mergePosts, toCardPosts, upgradeVideos, type CardPost } from "@/lib/feed-model";
import { PostError, publishAndConfirm } from "@/lib/post-client";
import { DeleteError, sendDelete } from "@/lib/delete-client";
import type { DiscoverExpert } from "@/lib/discover";
import type { ReactNode } from "react";
import type { DiscoverExpert, DiscoverMinnect } from "@/lib/discover";
import type { ComposerProps } from "./Composer";
import { FeedView, type FeedStatus } from "./FeedView";
import { useCompactLayout } from "./layout-context";
@@ -18,6 +19,8 @@ export function Feed({
feedUserId,
person,
featuredExperts,
trendingMinnects,
searchPanel,
}: {
onSignedOut: () => void;
feedUserId?: string | null;
@@ -25,6 +28,9 @@ export function Feed({
person?: ComposerProps["person"];
/** Shown as a slide after the second post on phones. */
featuredExperts?: DiscoverExpert[];
/** Phone Discover sheet: trending minnects and the Find experts panel. */
trendingMinnects?: DiscoverMinnect[];
searchPanel?: ReactNode;
}) {
const [posts, setPosts] = useState<CardPost[]>([]);
const [status, setStatus] = useState<FeedStatus>("loading");
@@ -285,6 +291,8 @@ export function Feed({
onSignedOut={onSignedOut}
composer={{ value: draft, busy: posting, error: postFailed, file, onChange: changeDraft, onFile: changeFile, onSubmit: () => void publish(), person }}
featuredExperts={featuredExperts}
trendingMinnects={trendingMinnects}
searchPanel={searchPanel}
hasMore={!!nextCursor}
sentinelRef={sentinel}
listRef={list}