perf(frontend): eliminate author profile waterfall — use thought.author directly

This commit is contained in:
2026-05-15 19:47:06 +02:00
parent 9ecbde019d
commit dadfe04934
10 changed files with 8581 additions and 114 deletions

View File

@@ -1,6 +1,6 @@
import type { Metadata } from "next";
import { cookies } from "next/headers";
import { getMe, search, lookupRemoteActor, User } from "@/lib/api";
import { getMe, search, lookupRemoteActor } from "@/lib/api";
export async function generateMetadata({
searchParams,
@@ -51,13 +51,6 @@ export default async function SearchPage({ searchParams }: SearchPageProps) {
token ? getMe(token).catch(() => null) : null,
]);
const authorDetails = new Map<string, { avatarUrl?: string | null }>();
if (results) {
results.users.forEach((user: User) => {
authorDetails.set(user.username, { avatarUrl: user.avatarUrl });
});
}
return (
<div className="container mx-auto max-w-2xl p-4 sm:p-6">
<header className="my-6">
@@ -91,7 +84,6 @@ export default async function SearchPage({ searchParams }: SearchPageProps) {
<TabsContent value="thoughts">
<ThoughtList
thoughts={results.thoughts}
authorDetails={authorDetails}
currentUser={me}
/>
</TabsContent>