Toast notifications
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user