3dom4wf7p: Publish public text posts from a feed composer

This commit is contained in:
2026-10-19 14:19:12 -06:00
parent 28037a2849
commit de535a500d
8 changed files with 404 additions and 0 deletions
+3
View File
@@ -1,5 +1,6 @@
import type { Ref } from "react";
import type { CardPost } from "@/lib/feed-model";
import { Composer, type ComposerProps } from "./Composer";
import { PostCard } from "./PostCard";
export type FeedStatus = "loading" | "ready" | "error";
@@ -15,6 +16,7 @@ export interface FeedViewProps {
onToggleLike?: (post: CardPost) => void;
likeBusy?: ReadonlySet<string>;
likeErrors?: ReadonlySet<string>;
composer?: ComposerProps;
sentinelRef?: Ref<HTMLDivElement>;
now?: number;
}
@@ -45,6 +47,7 @@ export function FeedView(p: FeedViewProps) {
}
return (
<section className="feed">
{p.composer ? <Composer {...p.composer} /> : null}
{p.newCount > 0 ? (
<button type="button" className="new-posts" onClick={p.onShowNew}>
{p.newCount === 1 ? "1 new post" : `${p.newCount} new posts`}