fix: wrong pic count

This commit is contained in:
Damien Ostler 2024-05-27 11:36:56 -04:00
parent 1647474a74
commit 052bc21604
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ export async function GET(
.eq('name', galleryId) .eq('name', galleryId)
.single(); .single();
// List all files in the galleryId path // List all files in the galleryId path
let { data: files, error } = await supabase.storage.from('galleries').list(gallery.name); let { data: files, error } = await supabase.storage.from('galleries').list(params.id.toLowerCase().replace(/\s+/g, '_'));
if (files==null || error) { if (files==null || error) {
//console.error('Error listing files:', error); //console.error('Error listing files:', error);

View File

@ -121,7 +121,7 @@ function PageComponent() {
<div className="grid grid-cols-3 gap-y-52 gap-x-5 h-full overflow-y-auto no-scrollbar pt-20"> <div className="grid grid-cols-3 gap-y-52 gap-x-5 h-full overflow-y-auto no-scrollbar pt-20">
{galleries && galleries.map((gallery, index) => ( {galleries && galleries.map((gallery, index) => (
<GalleryThumbnail <GalleryThumbnail
key={gallery.id} key={gallery.name}
id={gallery.name} id={gallery.name}
title={gallery.name} title={gallery.name}
tags = {gallery.tags} tags = {gallery.tags}