a18hvcryt: Delete the signed-in person's own post from its menu

This commit is contained in:
2026-10-19 14:32:06 -06:00
parent 5a33546af2
commit 0861663bea
14 changed files with 383 additions and 8 deletions
+8 -2
View File
@@ -38,7 +38,13 @@ export function App() {
);
}
if (state.kind === "out") {
return <SignInForm onSignedIn={(person) => setState({ kind: "in", person })} />;
return <SignInForm onSignedIn={(person) => {
setState({ kind: "in", person });
// POST /api/session keeps its shape; the feed user id comes from GET.
void loadSession().then((full) => {
if (full) setState({ kind: "in", person: full });
});
}} />;
}
return (
<main className="shell">
@@ -52,7 +58,7 @@ export function App() {
{signingOut ? "Signing out..." : "Sign out"}
</button>
</header>
<Feed onSignedOut={() => setState({ kind: "out" })} />
<Feed feedUserId={state.person.feedUserId} onSignedOut={() => setState({ kind: "out" })} />
</main>
);
}