From bda54706389487c27c582699d52cd63b5c8da8f9 Mon Sep 17 00:00:00 2001 From: 230419 <230419@epvc.pt> Date: Mon, 4 May 2026 14:47:12 +0100 Subject: [PATCH] link mac test server --- src/App.jsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 236924a..62803df 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -620,14 +620,18 @@ export default function App() { // Notify the owner if (sharedLookData.ownerUid && sharedLookData.ownerUid !== user.uid) { - const notificationsCol = collection(db, 'artifacts', appId, 'users', sharedLookData.ownerUid, 'notifications'); - await addDoc(notificationsCol, { - type: 'look_copied', - lookName: sharedLookData.lookName, - copiedByEmail: userProfile?.username || user.email || 'Alguém', - createdAt: new Date().getTime(), - read: false - }); + try { + const notificationsCol = collection(db, 'artifacts', appId, 'users', sharedLookData.ownerUid, 'notifications'); + await addDoc(notificationsCol, { + type: 'look_copied', + lookName: sharedLookData.lookName, + copiedByEmail: userProfile?.username || user.email || 'Alguém', + createdAt: new Date().getTime(), + read: false + }); + } catch (notifErr) { + console.warn('Não foi possível enviar notificação ao dono do look:', notifErr); + } } setShowSharedLookModal(false);