- {formData.phones.map((phone, index) => (
+ {formData?.phones?.map((phone, index) => (
{
SAVING...
>
) : (
- 'SAVE CONTACT'
+ `${actionStatus?.toUpperCase() || 'SAVE'} CONTACT`
)}
+
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 2d1bba3..140abf1 100644
--- a/src/components/templates/Templates.tsx
+++ b/src/components/templates/Templates.tsx
@@ -139,7 +139,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;