diff --git a/components/layouts/profile-layout.tsx b/components/layouts/profile-layout.tsx index 7d417c6..90789f0 100644 --- a/components/layouts/profile-layout.tsx +++ b/components/layouts/profile-layout.tsx @@ -87,15 +87,15 @@ export default function ProfileLayout({ children }: ProfileLayoutProps): JSX.Ele
diff --git a/server/api/routers/user.ts b/server/api/routers/user.ts index f6c87ff..1c7d0b6 100644 --- a/server/api/routers/user.ts +++ b/server/api/routers/user.ts @@ -21,6 +21,19 @@ export const userRouter = createTRPCRouter({ return await ctx.db.user.findUniqueOrThrow({ where: { username: input.username + }, + select: { + id: true, + displayName: true, + imageUrl: true, + username: true, + _count: { + select: { + posts: true, + followers: true, + following: true + } + } } }) }),