fix: joinedAt nullable in UserSchema, guard null in profile page

This commit is contained in:
2026-05-14 17:45:01 +02:00
parent 8ef3a300bc
commit 057ed3ccbf
3 changed files with 4 additions and 3 deletions

View File

@@ -188,7 +188,7 @@ export default async function ProfilePage({ params }: ProfilePageProps) {
>
<Calendar className="h-4 w-4" />
<span>
Joined {new Date(user.joinedAt).toLocaleDateString()}
Joined {user.joinedAt ? new Date(user.joinedAt).toLocaleDateString() : "Unknown"}
</span>
</div>
</Card>

View File

@@ -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 (