fix(frontend): align Zod schemas with camelCase API responses
per_page → perPage in paginated response schemas, drop tag field from tag endpoint
This commit is contained in:
@@ -68,7 +68,7 @@ export default async function RemoteActorPage({
|
||||
const postsData = postsResult.status === "fulfilled" ? postsResult.value : null;
|
||||
const posts = postsData?.items ?? [];
|
||||
const totalPages = postsData
|
||||
? Math.ceil(postsData.total / postsData.per_page)
|
||||
? Math.ceil(postsData.total / postsData.perPage)
|
||||
: 1;
|
||||
const me =
|
||||
meResult.status === "fulfilled" ? (meResult.value as Me | null) : null;
|
||||
|
||||
@@ -100,7 +100,7 @@ export default async function ProfilePage({ params }: ProfilePageProps) {
|
||||
const thoughtsData = thoughtsResult.status === "fulfilled" ? thoughtsResult.value : null;
|
||||
const thoughts = thoughtsData?.items ?? [];
|
||||
const totalPages = thoughtsData
|
||||
? Math.ceil(thoughtsData.total / thoughtsData.per_page)
|
||||
? Math.ceil(thoughtsData.total / thoughtsData.perPage)
|
||||
: 1;
|
||||
|
||||
const localFollowersCount =
|
||||
|
||||
@@ -22,8 +22,8 @@ export default async function AllUsersPage({
|
||||
);
|
||||
}
|
||||
|
||||
const { items, total, per_page } = usersData;
|
||||
const totalPages = Math.ceil(total / per_page);
|
||||
const { items, total, perPage } = usersData;
|
||||
const totalPages = Math.ceil(total / perPage);
|
||||
|
||||
return (
|
||||
<div className="container mx-auto max-w-2xl p-4 sm:p-6">
|
||||
|
||||
Reference in New Issue
Block a user