diff --git a/src/components/contacts/Contacts.tsx b/src/components/contacts/Contacts.tsx
index 0942e70..e164dfd 100644
--- a/src/components/contacts/Contacts.tsx
+++ b/src/components/contacts/Contacts.tsx
@@ -83,11 +83,11 @@ const Contacts = () => {
const handleContactSubmit = async (data: ContactData, type: "") => {
try {
- let res ;
+ let res;
setCreateAndInviteLoader(true);
if (type === 'Edit') {
- res = await api.put(`/api/accounts/${activeAccountId}/contacts`, [data])
- }else{
+ res = await api.put(`/api/accounts/${activeAccountId}/contacts`, [data])
+ } else {
res = await api.post(`/api/accounts/${activeAccountId}/contacts`, [data]);
}
if (res.status === 200) {
@@ -115,82 +115,84 @@ const Contacts = () => {
return (
<>
-
-
setShowModal((prev) => !prev)}
- className="flex items-center gap-2 bg-[var(--primary)] px-3 py-1.5 rounded-sm hover:opacity-90 ">
-
-
+
+
+
setShowModal((prev) => !prev)}
+ className="flex items-center gap-2 bg-[var(--primary)] px-3 py-1.5 rounded-sm hover:opacity-90 ">
+
+
+
-
-
-
-
-
- | First Name |
- Last Name |
- Email |
- Actions |
-
-
-
- {loading ? (
+
+
+
- | Loading... |
+ First Name |
+ Last Name |
+ Email |
+ Actions |
- ) : contacts.length === 0 ? (
-
- | No contacts found. |
-
- ) : (
- contacts.map((contact) => (
-
- | {contact.firstName} |
- {contact.lastName} |
- {contact.email} |
-
-
-
-
- {openMenuId === contact.id && (
-
-
-
-
- )}
-
- |
+
+
+ {loading ? (
+
+ | Loading... |
- ))
- )}
-
-
- {showModal &&
-
- }
+ ) : contacts.length === 0 ? (
+
+ | No contacts found. |
+
+ ) : (
+ contacts.map((contact) => (
+
+ | {contact.firstName} |
+ {contact.lastName} |
+ {contact.email} |
+
+
+
+
+ {openMenuId === contact.id && (
+
+
+
+
+ )}
+
+ |
+
+ ))
+ )}
+
+
+ {showModal &&
+
+ }
+
>
);
diff --git a/src/components/dashboard/Loader.tsx b/src/components/dashboard/Loader.tsx
index 3f1093e..8e094ca 100644
--- a/src/components/dashboard/Loader.tsx
+++ b/src/components/dashboard/Loader.tsx
@@ -1,4 +1,3 @@
-import React from 'react'
import { LuSignature } from "react-icons/lu";
import { useSelector } from 'react-redux';
import { RootState } from '../../store/store';
diff --git a/src/components/templates/Templates.tsx b/src/components/templates/Templates.tsx
index 47c22c6..9a4391d 100644
--- a/src/components/templates/Templates.tsx
+++ b/src/components/templates/Templates.tsx
@@ -136,7 +136,15 @@ const Templates = () => {
- {templates.length > 0 ? (
+ {loading ? (
+
+
+ |
+
+ |
+
+
+ ) : templates.length > 0 ? (
{templates.map((item, index) => {
return (
@@ -200,18 +208,12 @@ const Templates = () => {
) : (
-
-
- {/* Pulsing background div */}
-
-
- {/* Loader stays on top, no animation */}
-
-
+ |
+ No templates found.
|
-
+
)}
diff --git a/src/helper/LoaderUi.tsx b/src/helper/LoaderUi.tsx
index c118cb4..0113300 100644
--- a/src/helper/LoaderUi.tsx
+++ b/src/helper/LoaderUi.tsx
@@ -1,19 +1,22 @@
+import { LuSignature } from "react-icons/lu";
interface StyleProps {
- classStyle : string
+ classStyle?: string;
}
-const LoaderUi = ({ classStyle }:StyleProps) => {
- return (
-
-
-
- )
-}
+const LoaderUi = ({ classStyle = '' }: StyleProps) => {
+ return (
+
+ {/* Overlay */}
+
-export default LoaderUi
\ No newline at end of file
+ {/* Loader box */}
+
+
+ );
+};
+
+export default LoaderUi;