diff --git a/app/pages/page.tsx b/app/pages/page.tsx index 81d75911..bacada36 100644 --- a/app/pages/page.tsx +++ b/app/pages/page.tsx @@ -592,8 +592,8 @@ export default function CarnetPage() { const { content } = await response.json(); // Split the content into individual vCards existingContacts = content.split('BEGIN:VCARD') - .filter(section => section.trim()) - .map(section => 'BEGIN:VCARD' + section.trim()); + .filter((section: string) => section.trim()) + .map((section: string) => 'BEGIN:VCARD' + section.trim()); } } catch (error) { // If the file doesn't exist, we'll create it with just the new contact @@ -703,14 +703,14 @@ export default function CarnetPage() { const { content } = await response.json(); // Split the content into individual vCards and filter out the one to delete - const vcards = content.split('BEGIN:VCARD').filter(section => section.trim()); - const updatedVcards = vcards.filter(section => { + const vcards = content.split('BEGIN:VCARD').filter((section: string) => section.trim()); + const updatedVcards = vcards.filter((section: string) => { const vcard = parseVCard('BEGIN:VCARD' + section); return vcard.uid?.[0]?.value !== contact.id; }); // Join the remaining vCards back together - const vcfContent = updatedVcards.map(section => 'BEGIN:VCARD' + section).join('\n'); + const vcfContent = updatedVcards.map((section: string) => 'BEGIN:VCARD' + section).join('\n'); // Save the updated VCF file const saveResponse = await fetch('/api/nextcloud/files', {