a18hvcryt: Delete the signed-in person's own post from its menu
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user