diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx
index ac7cd29..19aca88 100644
--- a/src/Layouts/DefaultLayout.tsx
+++ b/src/Layouts/DefaultLayout.tsx
@@ -56,9 +56,9 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
- {nav?.map(({ title, path, Icon, type, children }, index) => type === 'single' ?
+ {nav?.map(({ title, path, Icon, type, children, initPath }, index) => type === 'single' ?
{title} :
-
+
navigate(path)} gap={0} style={{ cursor: 'pointer', borderRadius: '8px', padding: '5px', width: '100%', display: 'flex', alignItems: 'center', border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000', fontSize: '14px', }}> {title}
{children?.map(({ title, path, Icon }, index) => navigate(path)} style={{ marginTop: 6, cursor: 'pointer', borderRadius: '8px', padding: '6px', width: '100%', display: 'flex', alignItems: 'center', gap: 6, border: '1px solid #ffffff', backgroundColor:'#fff',color:'#919198' }} > {title})}
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
index 28461d7..23ddda3 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
@@ -1,56 +1,41 @@
-import { Box, HStack, Text, Skeleton, VStack, Center } from "@chakra-ui/react";
-import MainFrame from "../../../components/MainFrame";
-import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
+import { Badge, HStack, Text, VStack } from "@chakra-ui/react";
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
-import PrivacyPolicySkeleton from "./privacyPolicySkeleton";
+import MainFrame from "../../../components/MainFrame";
import { Spinner } from "../../../components/Sipnner/Spinner";
+import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
const PrivacyPolicy = () => {
- // Fetch data using RTK Query with type annotations
const { data, isLoading, isFetching } = useGetPrivacyPolicyQuery();
-
- console.log(isLoading);
-
-
- // Log the response for debugging
- console.log("====================================");
- console.log(data);
- console.log("====================================");
-
-
return (
-
- {isLoading?
- :data?.data?.map(({id,content}, index)=>
-
-
- Privacy Policy
-
+
+ {isLoading || isFetching ?
+ : data?.data?.map(({ id, content, privacy_language }) =>
+
-
+ py={0}
+ px={0}
+ >
+
+ Privacy Policy 🎓 {privacy_language?.language_name}
+
- {/* Render multiple skeletons or content based on loading state */}
-
-
- {content}
-
-
- )}
+
+
+
+ {content}
+
+
+ )}
);
diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts
index a962322..03cf928 100644
--- a/src/Routes/Nav.ts
+++ b/src/Routes/Nav.ts
@@ -17,7 +17,7 @@ export const nav = [
},
{
title: "Manage Users",
- // path: "/manage-users",
+ initPath: "/manage-users",
Icon: BiUserPin,
type:'multiple',
children: [
@@ -65,7 +65,7 @@ export const nav = [
},
{
title: "Manage CMS",
- // path: "",
+ initPath: "/manage-cms",
Icon: AiOutlineFileText,
type:'multiple',
children: [
@@ -104,7 +104,7 @@ export const nav = [
},
{
title: "Master Module",
- // path: "/master-module",
+ initPath: "/master-module",
Icon: BsBoxes,
type:'multiple',
children: [
diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx
index c3e5c03..19e73c7 100644
--- a/src/components/MainFrame.tsx
+++ b/src/components/MainFrame.tsx
@@ -14,12 +14,12 @@ interface MainFrameProps {
const MainFrame: FC = ({ children, transperant }) => {
return (
-
+