grain.social is a photo sharing platform built on atproto. grain.social
atproto photography appview
50
fork

Configure Feed

Select the types of activity you want to include in your feed.

order gallery items by created at

+23 -17
+23 -17
main.tsx
··· 691 691 const { items: galleryItems } = ctx.indexService.getRecords< 692 692 WithBffMeta<GalleryItem> 693 693 >("social.grain.gallery.item", { 694 + orderBy: { field: "createdAt", direction: "asc" }, 694 695 where: [{ field: "gallery", in: galleryUris }], 695 696 }); 696 697 ··· 1420 1421 ) { 1421 1422 return ( 1422 1423 <div class="flex flex-col px-4 pt-4 mb-4 space-y-4"> 1423 - {returnTo 1424 - ? ( 1425 - <a 1426 - href={returnTo} 1427 - class="hover:underline" 1428 - > 1429 - <i class="fa-solid fa-arrow-left mr-2" /> 1430 - Back to gallery 1431 - </a> 1432 - ) 1433 - : ( 1434 - <a href={profileLink(handle)} class="hover:underline"> 1435 - <i class="fa-solid fa-arrow-left mr-2" /> 1436 - Back to profile 1437 - </a> 1438 - )} 1424 + <div class="flex"> 1425 + <div class="flex-1"> 1426 + {returnTo 1427 + ? ( 1428 + <a 1429 + href={returnTo} 1430 + class="hover:underline" 1431 + > 1432 + <i class="fa-solid fa-arrow-left mr-2" /> 1433 + Back to gallery 1434 + </a> 1435 + ) 1436 + : ( 1437 + <a href={profileLink(handle)} class="hover:underline"> 1438 + <i class="fa-solid fa-arrow-left mr-2" /> 1439 + Back to profile 1440 + </a> 1441 + )} 1442 + </div> 1443 + <div>10/100 photos</div> 1444 + </div> 1439 1445 <Button variant="primary" class="mb-4" asChild> 1440 1446 <label class="w-fit"> 1441 1447 <i class="fa fa-plus"></i> Add photos ··· 1447 1453 _="on change 1448 1454 set fileList to me.files 1449 1455 if fileList.length > 10 1450 - alert('You can only upload 10 photos') 1456 + alert('You can only upload 10 photos at a time') 1451 1457 halt 1452 1458 end 1453 1459 for file in fileList