carnet panel contact 2

This commit is contained in:
alma 2025-04-20 22:47:23 +02:00
parent 3e3c077cf8
commit 1124a8c814

View File

@ -79,7 +79,11 @@ export default function CarnetPage() {
throw new Error('Failed to fetch folders');
}
const data = await response.json();
setNextcloudFolders(data);
// Filter for VCF files and extract basenames
const vcfFiles = data
.filter((file: any) => file.basename.endsWith('.vcf'))
.map((file: any) => file.basename.replace('.vcf', ''));
setNextcloudFolders(vcfFiles);
} catch (error) {
console.error('Error fetching folders:', error);
}