Toast notifications

This commit is contained in:
Brad Traversy
2024-07-12 07:13:33 -04:00
parent 91f038a33f
commit 5457768fac
4 changed files with 32 additions and 2 deletions
+3
View File
@@ -2,6 +2,7 @@
import { useState } from 'react';
import Image from 'next/image';
import Link from 'next/link';
import { toast } from 'react-toastify';
import deleteProperty from '@/app/actions/deleteProperty';
const ProfileProperties = ({ properties: initialProperties }) => {
@@ -18,6 +19,8 @@ const ProfileProperties = ({ properties: initialProperties }) => {
await deletePropertyById();
toast.success('Property Deleted');
const updatedProperties = properties.filter(
(property) => property._id !== propertyId
);