Write on the margins of the internet. Powered by the AT Protocol. margin.at
extension web atproto comments

fix: small fixes

+4 -7
+4 -7
web/src/views/profile/Profile.tsx
··· 284 284 limit: LIMIT, 285 285 offset: tabPagination.offset, 286 286 }); 287 - const fetched = res.items || []; 288 287 setItems((prev) => ({ 289 288 ...prev, 290 - [capturedTab]: [...prev[capturedTab], ...(res.items || [])], 289 + [capturedTab]: [...prev[capturedTab], ...res.items], 291 290 })); 292 291 setPagination((prev) => ({ 293 292 ...prev, 294 293 [capturedTab]: { 295 - hasMore: res.hasMore ?? fetched.length >= LIMIT, 296 - offset: 297 - prev[capturedTab].offset + (res.fetchedCount ?? fetched.length), 294 + hasMore: res.hasMore, 295 + offset: prev[capturedTab].offset + res.fetchedCount, 298 296 }, 299 297 })); 300 298 } catch (e) { ··· 347 345 { id: "collections", label: "Collections" }, 348 346 ]; 349 347 350 - const currentItems = 351 - activeTab !== "collections" ? items[activeTab] : collections; 348 + const currentItems = activeTab !== "collections" ? items[activeTab] : []; 352 349 353 350 const LABEL_DESCRIPTIONS: Record<string, string> = { 354 351 sexual: "Sexual Content",