diff --git a/thoughts-frontend/app/users/[username]/page.tsx b/thoughts-frontend/app/users/[username]/page.tsx
index 8820fd2..00084a4 100644
--- a/thoughts-frontend/app/users/[username]/page.tsx
+++ b/thoughts-frontend/app/users/[username]/page.tsx
@@ -188,7 +188,7 @@ export default async function ProfilePage({ params }: ProfilePageProps) {
>
- Joined {new Date(user.joinedAt).toLocaleDateString()}
+ Joined {user.joinedAt ? new Date(user.joinedAt).toLocaleDateString() : "Unknown"}
diff --git a/thoughts-frontend/app/users/all/page.tsx b/thoughts-frontend/app/users/all/page.tsx
index 28f39d0..2456920 100644
--- a/thoughts-frontend/app/users/all/page.tsx
+++ b/thoughts-frontend/app/users/all/page.tsx
@@ -28,7 +28,8 @@ export default async function AllUsersPage({
);
}
- const { items, total, per_page } = usersData;\n const perPage = per_page;
+ const { items, total, per_page } = usersData;
+ const perPage = per_page;
const totalPages = Math.ceil(total / perPage);
return (
diff --git a/thoughts-frontend/lib/api.ts b/thoughts-frontend/lib/api.ts
index 544d085..69b0e61 100644
--- a/thoughts-frontend/lib/api.ts
+++ b/thoughts-frontend/lib/api.ts
@@ -10,7 +10,7 @@ export const UserSchema = z.object({
customCss: z.string().nullable(),
local: z.boolean(),
isFollowedByViewer: z.boolean(),
- joinedAt: z.coerce.date(),
+ joinedAt: z.coerce.date().nullable(),
});
export const MeSchema = UserSchema;