Compare commits
2 Commits
8ef3a300bc
...
68261c4b2b
| Author | SHA1 | Date | |
|---|---|---|---|
| 68261c4b2b | |||
| 057ed3ccbf |
@@ -14,7 +14,8 @@ pub async fn get_home_feed(
|
|||||||
user_id: &UserId,
|
user_id: &UserId,
|
||||||
page: PageParams,
|
page: PageParams,
|
||||||
) -> Result<Paginated<FeedEntry>, DomainError> {
|
) -> Result<Paginated<FeedEntry>, DomainError> {
|
||||||
let following_ids = follows.get_accepted_following_ids(user_id).await?;
|
let mut following_ids = follows.get_accepted_following_ids(user_id).await?;
|
||||||
|
following_ids.push(user_id.clone()); // include own thoughts in home feed
|
||||||
feed.home_feed(&following_ids, &page, Some(user_id)).await
|
feed.home_feed(&following_ids, &page, Some(user_id)).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ export default async function ProfilePage({ params }: ProfilePageProps) {
|
|||||||
>
|
>
|
||||||
<Calendar className="h-4 w-4" />
|
<Calendar className="h-4 w-4" />
|
||||||
<span>
|
<span>
|
||||||
Joined {new Date(user.joinedAt).toLocaleDateString()}
|
Joined {user.joinedAt ? new Date(user.joinedAt).toLocaleDateString() : "Unknown"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -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);
|
const totalPages = Math.ceil(total / perPage);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export const UserSchema = z.object({
|
|||||||
customCss: z.string().nullable(),
|
customCss: z.string().nullable(),
|
||||||
local: z.boolean(),
|
local: z.boolean(),
|
||||||
isFollowedByViewer: z.boolean(),
|
isFollowedByViewer: z.boolean(),
|
||||||
joinedAt: z.coerce.date(),
|
joinedAt: z.coerce.date().nullable(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const MeSchema = UserSchema;
|
export const MeSchema = UserSchema;
|
||||||
|
|||||||
Reference in New Issue
Block a user