This commit is contained in:
JaiPandey425 2025-07-30 15:32:44 +05:30
parent 7cbd74fc14
commit 21290040cb
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import api from '../../config/api';
import ContactFormModal, { ContactData } from './ContactsFormModal';
import { Bounce, toast } from 'react-toastify';
import { IoMdAdd } from 'react-icons/io';
import LoaderUi from '../../helper/LoaderUi';
type ContactSchema = [{
id: number,
@ -25,6 +26,7 @@ const Contacts = () => {
console.log("editJsonData", editJsonData)
const fetchContacts = async () => {
setLoading(true)
try {
const res = await api.get(`/api/accounts/${activeAccountId}/contacts`);
setContacts(res.data.content || []);
@ -140,7 +142,7 @@ const Contacts = () => {
<tbody className="divide-y divide-gray-200">
{loading ? (
<tr>
<td colSpan="4" className="text-center py-4">Loading...</td>
<td colSpan="4" className="relative h-100"><LoaderUi/></td>
</tr>
) : contacts.length === 0 ? (
<tr>