link mac test server
This commit is contained in:
20
src/App.jsx
20
src/App.jsx
@@ -620,14 +620,18 @@ export default function App() {
|
|||||||
|
|
||||||
// Notify the owner
|
// Notify the owner
|
||||||
if (sharedLookData.ownerUid && sharedLookData.ownerUid !== user.uid) {
|
if (sharedLookData.ownerUid && sharedLookData.ownerUid !== user.uid) {
|
||||||
const notificationsCol = collection(db, 'artifacts', appId, 'users', sharedLookData.ownerUid, 'notifications');
|
try {
|
||||||
await addDoc(notificationsCol, {
|
const notificationsCol = collection(db, 'artifacts', appId, 'users', sharedLookData.ownerUid, 'notifications');
|
||||||
type: 'look_copied',
|
await addDoc(notificationsCol, {
|
||||||
lookName: sharedLookData.lookName,
|
type: 'look_copied',
|
||||||
copiedByEmail: userProfile?.username || user.email || 'Alguém',
|
lookName: sharedLookData.lookName,
|
||||||
createdAt: new Date().getTime(),
|
copiedByEmail: userProfile?.username || user.email || 'Alguém',
|
||||||
read: false
|
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);
|
setShowSharedLookModal(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user