mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-10-27 13:16:30 -04:00
perf: fetch session and comments in parallel, pass current user to comment components instead of useSession
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
6 files changed
+56
-36
No files matched your search
@@ -4,8 +4,11 @@ import { desc, eq, sql } from "drizzle-orm";
|
||||
import { db } from "@/lib/db";
|
||||
import * as schema from "@/lib/db/schema";
|
||||
|
||||
/** The public profile fields of a commenter (also used for the signed-in user in comment UI) */
|
||||
export type CommentUser = Pick<typeof schema.user.$inferSelect, "id" | "name" | "image">;
|
||||
|
||||
export type CommentWithUser = typeof schema.comment.$inferSelect & {
|
||||
user: Pick<typeof schema.user.$inferSelect, "id" | "name" | "image">;
|
||||
user: CommentUser;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user