From 663cdfc2971509565a2d997c52372d107cbf2520 Mon Sep 17 00:00:00 2001
From: AnsariTufail <168163201+AnsariTufail@users.noreply.github.com>
Date: Tue, 11 Feb 2025 17:20:36 +0530
Subject: [PATCH 1/8] update
---
dev-dist/sw.js | 2 +-
.../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 13 ++-
src/Redux/Service/manage.aboutus.service.ts | 11 ---
src/Redux/Service/privacy.policy.service.ts | 83 ++++++++++++++-----
4 files changed, 73 insertions(+), 36 deletions(-)
diff --git a/dev-dist/sw.js b/dev-dist/sw.js
index 2892c8c..bcb0387 100644
--- a/dev-dist/sw.js
+++ b/dev-dist/sw.js
@@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812"
}, {
"url": "index.html",
- "revision": "0.s1fup7lrbig"
+ "revision": "0.vu9poovgqsg"
}], {});
workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
index d6fa126..6397e9f 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
@@ -2,9 +2,17 @@ import { Box, HStack, Text } from "@chakra-ui/react";
import MainFrame from "../../../components/MainFrame"
import { p } from "framer-motion/client";
import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
-
-
+import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service.ts";
const PrivacyPolicy = () => {
+
+ const {
+ data
+ } = useGetPrivacyPolicyQuery()
+
+ console.log('============================');
+ console.log(data);
+ console.log('============================');
+
return (
@@ -21,7 +29,6 @@ const PrivacyPolicy = () => {
-
diff --git a/src/Redux/Service/manage.aboutus.service.ts b/src/Redux/Service/manage.aboutus.service.ts
index 300f497..6b82556 100644
--- a/src/Redux/Service/manage.aboutus.service.ts
+++ b/src/Redux/Service/manage.aboutus.service.ts
@@ -52,17 +52,6 @@ export const aboutUs = createApi({
export const {
useGetAboutUsQuery,
-
-
-
-
-
-
-
-
-
-
-
useGetPostByIdQuery,
useCreatePostMutation,
useUpdatePostMutation,
diff --git a/src/Redux/Service/privacy.policy.service.ts b/src/Redux/Service/privacy.policy.service.ts
index b7e3126..4eaf5ac 100644
--- a/src/Redux/Service/privacy.policy.service.ts
+++ b/src/Redux/Service/privacy.policy.service.ts
@@ -1,26 +1,67 @@
-import { createApi } from "@reduxjs/toolkit/query";
+import { createApi } from "@reduxjs/toolkit/query/react"; // Fix import
import { baseQueryWithReauth } from "./apiSlice";
+
+
export const privacyPolicy = createApi({
- reducerPath: "privacyPolicy",
- baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling
- endpoints: (builder) => ({
-
-
-
- getPosts: builder.query({ query: () => "/posts" }),
-
-
-
-
-
+ reducerPath: "privacyPolicy",
+ baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling
+ endpoints: (builder) => ({
+ // 🔹 GET: Fetch all privacy policies
+ getPrivacyPolicy: builder.query({
+ query: () => "/privacy-policy",
}),
- });
+
+ // 🔹 GET: Fetch a single post by ID
+ // getPostById: builder.query({
+ // query: (id) => `/posts/${id}`,
+ // }),
+
+ // 🔹 POST: Create a new post
+ // createPost: builder.mutation>({
+ // query: (newPost) => ({
+ // url: "/posts",
+ // method: "POST",
+ // body: newPost,
+ // }),
+ // }),
+
+ // 🔹 PUT: Update an existing post
+ // updatePost: builder.mutation }>({
+ // query: ({ id, updatedData }) => ({
+ // url: `/posts/${id}`,
+ // method: "PUT",
+ // body: updatedData,
+ // }),
+ // }),
+
+ // 🔹 DELETE: Remove a post by ID
+ // deletePost: builder.mutation<{ success: boolean }, number>({
+ // query: (id) => ({
+ // url: `/posts/${id}`,
+ // method: "DELETE",
+ // }),
+ // }),
+ }),
+});
+
+// Export hooks for usage in components
+export const {
+ useGetPrivacyPolicyQuery, // Export the correct hook
- export const { } = privacyPolicy;
-
- export type Post = {
- id: number;
- title: string;
- body: string;
- };
\ No newline at end of file
+} = privacyPolicy;
+
+
+// Define types at the top for better readability
+export type Post = {
+ id: number;
+ title: string;
+ body: string;
+};
+
+export type PrivacyPolicy = {
+ id: number;
+ language_master_xid: number;
+ content: string;
+ is_active: boolean;
+};
\ No newline at end of file
From 795643eead2a4d82159dbea5a90c8926d14edf01 Mon Sep 17 00:00:00 2001
From: "Siddhesh.More"
Date: Tue, 11 Feb 2025 20:14:29 +0530
Subject: [PATCH 2/8] updaate
---
src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx | 4 ++--
src/Routes/Nav.ts | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx b/src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx
index de0a4d3..0fec845 100644
--- a/src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx
+++ b/src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx
@@ -28,8 +28,8 @@ const managepost: any[] = [
"Images": (
//
-
-
+
+
diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts
index e0c0a56..83956b9 100644
--- a/src/Routes/Nav.ts
+++ b/src/Routes/Nav.ts
@@ -17,7 +17,7 @@ export const nav = [
},
{
title: "Manage Users",
- path: "",
+ path: "/register-users",
Icon: BiUserPin,
type:'multiple',
children: [
@@ -65,7 +65,7 @@ export const nav = [
},
{
title: "Manage CMS",
- path: "",
+ path: "/faq",
Icon: AiOutlineFileText,
type:'multiple',
children: [
@@ -104,7 +104,7 @@ export const nav = [
},
{
title: "Master Module",
- path: "",
+ path: "/agency-master",
Icon: BsBoxes,
type:'multiple',
children: [
From 688f6740627f6cdb421849d1fb012420be1d9d10 Mon Sep 17 00:00:00 2001
From: "Siddhesh.More"
Date: Wed, 12 Feb 2025 11:54:21 +0530
Subject: [PATCH 3/8] update
---
src/Layouts/DefaultLayout.tsx | 15 +++++++---
src/Pages/Dashboard/Dashboard.tsx | 2 ++
src/Pages/Login.tsx | 6 +++-
src/Pages/ManageCMS/FAQ/FAQ.tsx | 2 +-
src/Pages/ManageContact/ManageContact.tsx | 4 +--
src/Pages/ManageGroups/ManageGroups.tsx | 4 +--
src/Pages/ManageJobs/ManageJobs.tsx | 4 +--
src/Pages/ManagePost/ManagePost.tsx | 4 +--
.../DeactivatedAccounts.tsx | 2 +-
.../RegisterUsers/RegisterUsers.tsx | 4 +--
.../AgencyMaster/AgencyMaster.tsx | 2 +-
src/Pages/MasterModule/Country/Country.tsx | 4 +--
.../MasterModule/JobStatus/JobStatus.tsx | 4 +--
src/Pages/MasterModule/JobType/JobType.tsx | 4 +--
.../TemplateMaster/TemplateMaster.tsx | 4 +--
.../WorkspaceMode/WorkspaceMode.tsx | 4 +--
src/Pages/SubAdmin/SubAdmin.tsx | 2 +-
src/Routes/Routes.ts | 3 ++
src/components/MainFrame.tsx | 3 +-
src/components/ProgressBar/ProgessBar.css | 20 +++++++++++++
src/components/ProgressBar/ProgressBar.tsx | 12 ++++++++
src/components/Sipnner/Spinner.css | 28 ++++++++++++++++++
src/components/Sipnner/Spinner.tsx | 7 +++++
src/components/ui/toaster.tsx | 6 ++--
src/index.css | 29 +++----------------
25 files changed, 121 insertions(+), 58 deletions(-)
create mode 100644 src/components/ProgressBar/ProgessBar.css
create mode 100644 src/components/ProgressBar/ProgressBar.tsx
create mode 100644 src/components/Sipnner/Spinner.css
create mode 100644 src/components/Sipnner/Spinner.tsx
diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx
index e398ae7..ac7cd29 100644
--- a/src/Layouts/DefaultLayout.tsx
+++ b/src/Layouts/DefaultLayout.tsx
@@ -11,6 +11,7 @@ import { logout } from "../Redux/Service/authSlice";
import { useDispatch } from "react-redux";
import GlobalStateContext from "../Contexts/GlobalStateContext";
import { useLogOutMutation } from "../Redux/Service/apiSlice";
+import ProgressBar from "../components/ProgressBar/ProgressBar";
const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
@@ -46,12 +47,15 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
};
return (
-
-
-
+
+
+
+
+
+
-
+
{nav?.map(({ title, path, Icon, type, children }, index) => type === 'single' ?
{title} :
@@ -66,7 +70,9 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
+
+
navigate('/profile')} >
@@ -79,6 +85,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
{children}
+
);
};
diff --git a/src/Pages/Dashboard/Dashboard.tsx b/src/Pages/Dashboard/Dashboard.tsx
index 10539a7..a01dcf6 100644
--- a/src/Pages/Dashboard/Dashboard.tsx
+++ b/src/Pages/Dashboard/Dashboard.tsx
@@ -26,6 +26,7 @@ import {
SelectValueText
} from "../../components/ui/select";
import AgencyName from "./AgencyName";
+import { Spinner } from "../../components/Sipnner/Spinner";
const Dashboard = () => {
const frameworks = createListCollection({
@@ -186,6 +187,7 @@ const Dashboard = () => {
+
);
};
diff --git a/src/Pages/Login.tsx b/src/Pages/Login.tsx
index 23f08c8..585aada 100644
--- a/src/Pages/Login.tsx
+++ b/src/Pages/Login.tsx
@@ -5,6 +5,7 @@ import {
Image,
Input,
Text,
+ Theme,
VStack,
} from "@chakra-ui/react";
import axios from "axios";
@@ -78,6 +79,8 @@ const Login = () => {
console.log("====================================");
}
} catch (error) {
+ console.log('error', error);
+
if (error) {
toaster.create({
// title: error?.response?.data?.message,
@@ -91,7 +94,8 @@ const Login = () => {
});
return (
-
+
+
{
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
+ size={"xs"}
fontSize={"2sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
diff --git a/src/Pages/ManageContact/ManageContact.tsx b/src/Pages/ManageContact/ManageContact.tsx
index d4d44ed..9861955 100644
--- a/src/Pages/ManageContact/ManageContact.tsx
+++ b/src/Pages/ManageContact/ManageContact.tsx
@@ -60,8 +60,8 @@ const ManageContact = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/ManageGroups/ManageGroups.tsx b/src/Pages/ManageGroups/ManageGroups.tsx
index 7cb4b8f..5824d73 100644
--- a/src/Pages/ManageGroups/ManageGroups.tsx
+++ b/src/Pages/ManageGroups/ManageGroups.tsx
@@ -82,8 +82,8 @@ const ManageGroups = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/ManageJobs/ManageJobs.tsx b/src/Pages/ManageJobs/ManageJobs.tsx
index 06ec2bf..3d408ab 100644
--- a/src/Pages/ManageJobs/ManageJobs.tsx
+++ b/src/Pages/ManageJobs/ManageJobs.tsx
@@ -83,8 +83,8 @@ const ManageJobs = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/ManagePost/ManagePost.tsx b/src/Pages/ManagePost/ManagePost.tsx
index fe4709e..8f63a58 100644
--- a/src/Pages/ManagePost/ManagePost.tsx
+++ b/src/Pages/ManagePost/ManagePost.tsx
@@ -90,8 +90,8 @@ const ManagePost = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/ManageUsers/DeactivatedAccounts/DeactivatedAccounts.tsx b/src/Pages/ManageUsers/DeactivatedAccounts/DeactivatedAccounts.tsx
index 8daf4f8..93c5727 100644
--- a/src/Pages/ManageUsers/DeactivatedAccounts/DeactivatedAccounts.tsx
+++ b/src/Pages/ManageUsers/DeactivatedAccounts/DeactivatedAccounts.tsx
@@ -57,7 +57,7 @@ const DeactivatedAccounts = () => {
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
size={"2xs"}
- fontSize={"2sm"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/ManageUsers/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUsers/RegisterUsers/RegisterUsers.tsx
index 95965a9..c552fe3 100644
--- a/src/Pages/ManageUsers/RegisterUsers/RegisterUsers.tsx
+++ b/src/Pages/ManageUsers/RegisterUsers/RegisterUsers.tsx
@@ -84,8 +84,8 @@ const RegisterUsers = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/MasterModule/AgencyMaster/AgencyMaster.tsx b/src/Pages/MasterModule/AgencyMaster/AgencyMaster.tsx
index 2390a39..2bac861 100644
--- a/src/Pages/MasterModule/AgencyMaster/AgencyMaster.tsx
+++ b/src/Pages/MasterModule/AgencyMaster/AgencyMaster.tsx
@@ -77,7 +77,7 @@ const AgencyMaster = () => {
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
size={"xs"}
- fontSize={"2sm"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/MasterModule/Country/Country.tsx b/src/Pages/MasterModule/Country/Country.tsx
index 063eb7d..96afe6e 100644
--- a/src/Pages/MasterModule/Country/Country.tsx
+++ b/src/Pages/MasterModule/Country/Country.tsx
@@ -63,8 +63,8 @@ const Country = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/MasterModule/JobStatus/JobStatus.tsx b/src/Pages/MasterModule/JobStatus/JobStatus.tsx
index 409dfc1..403509a 100644
--- a/src/Pages/MasterModule/JobStatus/JobStatus.tsx
+++ b/src/Pages/MasterModule/JobStatus/JobStatus.tsx
@@ -63,8 +63,8 @@ const JobStatus = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/MasterModule/JobType/JobType.tsx b/src/Pages/MasterModule/JobType/JobType.tsx
index 353387f..6c7b3d4 100644
--- a/src/Pages/MasterModule/JobType/JobType.tsx
+++ b/src/Pages/MasterModule/JobType/JobType.tsx
@@ -63,8 +63,8 @@ const JobType = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx b/src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx
index 0fec845..a26c28f 100644
--- a/src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx
+++ b/src/Pages/MasterModule/TemplateMaster/TemplateMaster.tsx
@@ -76,8 +76,8 @@ const TemplateMaster = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/MasterModule/WorkspaceMode/WorkspaceMode.tsx b/src/Pages/MasterModule/WorkspaceMode/WorkspaceMode.tsx
index c5a2a21..ffc6939 100644
--- a/src/Pages/MasterModule/WorkspaceMode/WorkspaceMode.tsx
+++ b/src/Pages/MasterModule/WorkspaceMode/WorkspaceMode.tsx
@@ -63,8 +63,8 @@ const WorkspaceMode = () => {
colorPalette={"blue"}
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
- size={"2xs"}
- fontSize={"2sm"}
+ size={"xs"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Pages/SubAdmin/SubAdmin.tsx b/src/Pages/SubAdmin/SubAdmin.tsx
index 51a01b2..b48a452 100644
--- a/src/Pages/SubAdmin/SubAdmin.tsx
+++ b/src/Pages/SubAdmin/SubAdmin.tsx
@@ -80,7 +80,7 @@ const SubAdmin = () => {
_focus={{ border: "1px solid #02A0A0" }}
rounded={"md"}
size={"xs"}
- fontSize={"2sm"}
+ fontSize={"sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
diff --git a/src/Routes/Routes.ts b/src/Routes/Routes.ts
index 084cc1b..c014a40 100644
--- a/src/Routes/Routes.ts
+++ b/src/Routes/Routes.ts
@@ -22,6 +22,7 @@ import Country from "../Pages/MasterModule/Country/Country";
import JobStatus from "../Pages/MasterModule/JobStatus/JobStatus";
import RegisterUsers from "../Pages/ManageUsers/RegisterUsers/RegisterUsers";
import DeactivatedAccounts from "../Pages/ManageUsers/DeactivatedAccounts/DeactivatedAccounts";
+import { Spinner } from "../components/Sipnner/Spinner";
export const RouteLink = [
{ path: "/", Component: Dashboard },
@@ -47,4 +48,6 @@ export const RouteLink = [
{ path: "/workspace-mode", Component: WorkspaceMode},
{ path: "/country", Component: Country},
{ path: "/job-status", Component: JobStatus},
+ // { path: "/job-status", Component: Spinner},
+
]
\ No newline at end of file
diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx
index e486ade..d6a3404 100644
--- a/src/components/MainFrame.tsx
+++ b/src/components/MainFrame.tsx
@@ -13,7 +13,7 @@ interface MainFrameProps {
const MainFrame: FC = ({ children }) => {
return (
-
+
= ({ children }) => {
rounded="lg"
boxShadow={'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px'}
pt={3}
+
>
{children}
diff --git a/src/components/ProgressBar/ProgessBar.css b/src/components/ProgressBar/ProgessBar.css
new file mode 100644
index 0000000..4c270b8
--- /dev/null
+++ b/src/components/ProgressBar/ProgessBar.css
@@ -0,0 +1,20 @@
+/* HTML: */
+.progressbar {
+ height: 4px;
+ width: 100%;
+ --c: no-repeat linear-gradient(#02A0A0 0 0);
+ background: var(--c), var(--c), #B8F8F8;
+ background-size: 60% 100%;
+ animation: l16 3s infinite;
+}
+
+@keyframes l16 {
+ 0% {background-position: -150% 0, -150% 0}
+ 66% {background-position: 250% 0, -150% 0}
+ 100% {background-position: 250% 0, 250% 0}
+}
+
+.progressbarInactive{
+ height: 4px;
+ width: 100%;
+}
\ No newline at end of file
diff --git a/src/components/ProgressBar/ProgressBar.tsx b/src/components/ProgressBar/ProgressBar.tsx
new file mode 100644
index 0000000..f5ff9ac
--- /dev/null
+++ b/src/components/ProgressBar/ProgressBar.tsx
@@ -0,0 +1,12 @@
+import React from "react";
+import './ProgessBar.css';
+
+interface ProgressBarProps {
+ isLoading: boolean;
+}
+
+const ProgressBar: React.FC = ({ isLoading }) => {
+ return ;
+};
+
+export default ProgressBar;
diff --git a/src/components/Sipnner/Spinner.css b/src/components/Sipnner/Spinner.css
new file mode 100644
index 0000000..b6df8cd
--- /dev/null
+++ b/src/components/Sipnner/Spinner.css
@@ -0,0 +1,28 @@
+/* HTML: */
+.loader {
+ width: 25px;
+ aspect-ratio: 1;
+ display: grid;
+ border-radius: 50%;
+ background:
+ linear-gradient(0deg, rgba(2, 160, 160, 0.5) 30%, transparent 0 70%, rgba(2, 160, 160, 1) 0) 50% / 8% 100%,
+ linear-gradient(90deg, rgba(2, 160, 160, 0.25) 30%, transparent 0 70%, rgba(2, 160, 160, 0.75) 0) 50% / 100% 8%;
+ background-repeat: no-repeat;
+ animation: l23 1s infinite steps(12);
+ }
+ .loader::before,
+ .loader::after {
+ content: "";
+ grid-area: 1/1;
+ border-radius: 50%;
+ background: inherit;
+ opacity: 0.915;
+ transform: rotate(30deg);
+ }
+ .loader::after {
+ opacity: 0.83;
+ transform: rotate(60deg);
+ }
+ @keyframes l23 {
+ 100% {transform: rotate(1turn)}
+ }
\ No newline at end of file
diff --git a/src/components/Sipnner/Spinner.tsx b/src/components/Sipnner/Spinner.tsx
new file mode 100644
index 0000000..12dc49d
--- /dev/null
+++ b/src/components/Sipnner/Spinner.tsx
@@ -0,0 +1,7 @@
+import { Center } from '@chakra-ui/react'
+import './Spinner.css'
+export const Spinner = () =>
+
+
+
+
diff --git a/src/components/ui/toaster.tsx b/src/components/ui/toaster.tsx
index a4251eb..9101dbf 100644
--- a/src/components/ui/toaster.tsx
+++ b/src/components/ui/toaster.tsx
@@ -17,16 +17,16 @@ export const toaster = createToaster({
export const Toaster = () => {
return (
-
+
{(toast) => (
-
+
{toast.type === "loading" ? (
) : (
)}
-
+
{toast.title && {toast.title}}
{toast.description && (
{toast.description}
diff --git a/src/index.css b/src/index.css
index 862601a..a7a0c7c 100644
--- a/src/index.css
+++ b/src/index.css
@@ -147,32 +147,10 @@ body {
}
-/* Style the scrollbar */
-::-webkit-scrollbar {
- width: 6px;
- /* Width of the vertical scrollbar */
- height: 12px;
- /* Height of the horizontal scrollbar */
-}
-
-/* Style the scrollbar track (the background area) */
-::-webkit-scrollbar-track {
- background-color: #f1f1f1;
- border-radius: 10px;
-}
-
-/* Style the scrollbar thumb (the draggable part) */
-::-webkit-scrollbar-thumb {
- background-color: #c8c8c8cf;
- /* Gray color for the thumb */
- border-radius: 10px;
- border: 1px solid #f1f1f1;
- /* Border around the thumb */
-}
/* Scrollbar width */
::-webkit-scrollbar {
- width: 8px;
+ width: 6px;
height: 8px;
cursor: pointer;
}
@@ -184,14 +162,15 @@ body {
/* Scrollbar thumb (the draggable part) */
::-webkit-scrollbar-thumb {
- background: rgba(0, 0, 0, 0.3); /* Light black (30% opacity) */
+ background: rgba(0, 0, 0, 0.2); /* Light black (30% opacity) */
border-radius: 10px; /* Rounded edges */
transition: background 0.3s;
}
/* On hover, make it darker */
::-webkit-scrollbar-thumb:hover {
- background: rgba(0, 0, 0, 0.5);
+ background: rgba(0, 0, 0, 0.411);
+ cursor: pointer;
}
From dbde49fffa0e812dc256e378f5fc95e93003ad4b Mon Sep 17 00:00:00 2001
From: AnsariTufail <168163201+AnsariTufail@users.noreply.github.com>
Date: Wed, 12 Feb 2025 11:58:17 +0530
Subject: [PATCH 4/8] Worked on the manage cms
---
dev-dist/sw.js | 6 +-
src/Pages/ManageCMS/AboutUs/AboutUs.tsx | 1 +
.../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 81 +++++++++++++------
src/Redux/Service/privacy.policy.service.ts | 1 +
4 files changed, 60 insertions(+), 29 deletions(-)
diff --git a/dev-dist/sw.js b/dev-dist/sw.js
index b030c08..af56fbe 100644
--- a/dev-dist/sw.js
+++ b/dev-dist/sw.js
@@ -82,11 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812"
}, {
"url": "index.html",
-<<<<<<< HEAD
- "revision": "0.vu9poovgqsg"
-=======
- "revision": "0.f3u8hds6p7"
->>>>>>> bc1d1923d21ac063f1096d709408895b7efc73f9
+ "revision": "0.iv1sobg60j"
}], {});
workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
diff --git a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
index 0d73b52..cc44cd9 100644
--- a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
+++ b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
@@ -6,6 +6,7 @@ import { useGetAboutUsQuery } from "../../../Redux/Service/manage.aboutus.servic
interface AboutUsContent {
+ id: number;
content: string;
}
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
index 6397e9f..f33ba9c 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
@@ -1,20 +1,35 @@
-import { Box, HStack, Text } from "@chakra-ui/react";
-import MainFrame from "../../../components/MainFrame"
-import { p } from "framer-motion/client";
+import { Box, HStack, Text, Skeleton } from "@chakra-ui/react";
+import MainFrame from "../../../components/MainFrame";
import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
-import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service.ts";
-const PrivacyPolicy = () => {
-
- const {
- data
- } = useGetPrivacyPolicyQuery()
+import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
- console.log('============================');
+// Define interfaces
+interface PrivacyPolicyContent {
+ id: number;
+ content: string;
+}
+
+interface ApiResponse {
+ data: {data:PrivacyPolicyContent[]};
+ isLoading: boolean
+}
+
+const PrivacyPolicy = () => {
+ // Fetch data using RTK Query with type annotations
+ const { data, isLoading } = useGetPrivacyPolicyQuery();
+
+ console.log(isLoading);
+
+
+ // Log the response for debugging
+ console.log("====================================");
console.log(data);
- console.log('============================');
+ console.log("====================================");
+
+ // Extract content array from the response
+ const content = data?.data?.[0]?.content;
return (
-
{
px={3}
>
- Privacy Policy
+ Privacy Policy
-
+
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam soluta doloremque quibusdam facilis quas, unde hic eaque doloribus sed perferendis atque, eos dolores eius consectetur iure sint adipisci itaque tempora fugit quidem culpa provident possimus. Ullam, vitae in voluptatum dignissimos, quos blanditiis sequi aut repellat error eaque veritatis unde quam temporibus adipisci consectetur neque vero exercitationem dolor cum numquam maiores alias, totam minima quas. Possimus, ratione harum. Alias laboriosam nesciunt esse fugit deserunt pariatur corporis tempora quia veniam laborum aliquid enim voluptatibus asperiores minima tempore repudiandae vero quo porro, doloribus explicabo sit beatae et hic natus. Non earum nisi reiciendis?
-
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam soluta doloremque quibusdam facilis quas, unde hic eaque doloribus sed perferendis atque, eos dolores eius consectetur iure sint adipisci itaque tempora fugit quidem culpa provident possimus. Ullam, vitae in voluptatum dignissimos, quos blanditiis sequi aut repellat error eaque veritatis unde quam temporibus adipisci consectetur neque vero exercitationem dolor cum numquam maiores alias, totam minima quas. Possimus, ratione harum. Alias laboriosam nesciunt esse fugit deserunt pariatur corporis tempora quia veniam laborum aliquid enim voluptatibus asperiores minima tempore repudiandae vero quo porro, doloribus explicabo sit beatae et hic natus. Non earum nisi reiciendis?
-
-
+
+ {/* Render multiple skeletons or content based on loading state */}
+ {isLoading || !content ? (
+
+
+
+
+
+
+
+ ) : (
+
+ {content}
+
+ )}
+
- )
-}
-export default PrivacyPolicy
\ No newline at end of file
+ );
+};
+
+export default PrivacyPolicy;
\ No newline at end of file
diff --git a/src/Redux/Service/privacy.policy.service.ts b/src/Redux/Service/privacy.policy.service.ts
index 4eaf5ac..b2e0bbb 100644
--- a/src/Redux/Service/privacy.policy.service.ts
+++ b/src/Redux/Service/privacy.policy.service.ts
@@ -3,6 +3,7 @@ import { baseQueryWithReauth } from "./apiSlice";
+
export const privacyPolicy = createApi({
reducerPath: "privacyPolicy",
baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling
From c5c3ebfedd3ea41b7a6f724c54e2d6d4cfe1f8b9 Mon Sep 17 00:00:00 2001
From: "parth.ramani"
Date: Wed, 12 Feb 2025 12:02:54 +0530
Subject: [PATCH 5/8] worked on the aboutus
---
src/Pages/ManageCMS/AboutUs/AboutUs.tsx | 42 +++-
.../ManageCMS/AboutUs/AboutUsAddModel.tsx | 194 +++++++++++++++---
src/Redux/Service/manage.aboutus.service.ts | 22 +-
3 files changed, 215 insertions(+), 43 deletions(-)
diff --git a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
index 0d73b52..89a481e 100644
--- a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
+++ b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
@@ -1,16 +1,15 @@
-import { Box, HStack, Text } from "@chakra-ui/react";
+import { Box, Center, HStack, Skeleton, Spinner, Text } from "@chakra-ui/react";
import MainFrame from "../../../components/MainFrame"
import { p } from "framer-motion/client";
import AboutUsAddModel from "../../ManageCMS/AboutUs/AboutUsAddModel";
import { useGetAboutUsQuery } from "../../../Redux/Service/manage.aboutus.service";
-
-interface AboutUsContent {
+interface AboutUs {
content: string;
}
interface ApiResponse {
- data: AboutUsContent[];
+ data: AboutUs[];
}
@@ -19,12 +18,13 @@ const AboutUs = () => {
// const {
// data: data
// } = useGetAboutUsQuery()
- const { data: response } = useGetAboutUsQuery<{ data: ApiResponse }>();
+ // const { data: response, isLoading } = useGetAboutUsQuery<{ data: ApiResponse }>();
+ const { data: response, isLoading } = useGetAboutUsQuery();
console.log('====================================');
console.log(response);
console.log('====================================');
- const content = response?.data?.[0]?.content || "No content available";
+ const content = response?.data?.[0]?.content;
return (
@@ -46,9 +46,35 @@ const AboutUs = () => {
-
+ {/* Show Skeleton until content is available */}
+ {isLoading || !content ? (
+
+
+
+
+
+
+
+
+
+
+
+ ) : (
+
+ {content}
+
+ )}
+ {/*
{content}
-
+ */}
{/*
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam soluta doloremque quibusdam facilis quas, unde hic eaque doloribus sed perferendis atque, eos dolores eius consectetur iure sint adipisci itaque tempora fugit quidem culpa provident possimus. Ullam, vitae in voluptatum dignissimos, quos blanditiis sequi aut repellat error eaque veritatis unde quam temporibus adipisci consectetur neque vero exercitationem dolor cum numquam maiores alias, totam minima quas. Possimus, ratione harum. Alias laboriosam nesciunt esse fugit deserunt pariatur corporis tempora quia veniam laborum aliquid enim voluptatibus asperiores minima tempore repudiandae vero quo porro, doloribus explicabo sit beatae et hic natus. Non earum nisi reiciendis?
*/}
diff --git a/src/Pages/ManageCMS/AboutUs/AboutUsAddModel.tsx b/src/Pages/ManageCMS/AboutUs/AboutUsAddModel.tsx
index 75b9c73..301c0de 100644
--- a/src/Pages/ManageCMS/AboutUs/AboutUsAddModel.tsx
+++ b/src/Pages/ManageCMS/AboutUs/AboutUsAddModel.tsx
@@ -1,53 +1,189 @@
-import { FaRegEdit } from "react-icons/fa"
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Field, Stack, Text, Textarea } from "@chakra-ui/react"
-import { Button } from "../../../components/ui/button"
+// import { FaRegEdit } from "react-icons/fa"
+// import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
+// import { Field, Stack, Text, Textarea } from "@chakra-ui/react"
+// import { Button } from "../../../components/ui/button"
+// import { useUpdateAboutUsMutation } from "../../../Redux/Service/manage.aboutus.service"
+
+// function AboutUsAddModel() {
+
+// const [ updateAboutUs ] = useUpdateAboutUsMutation()
+
+
+// try {
+// const res = updateAboutUs({id:2, updatedData:''})
+// console.log(res);
+
+
+// } catch (error) {
+
+// }
+
+
+
+
+// return (
+
+//
+//
+// {/* */}
+//
+
+//
+
+//
+//
+// Edit
+//
+
+//
+//
+
+//
+// AboutUs
+//
+//
+//
+//
+//
+//
+//
+
+//
+//
+//
+
+// )
+// }
+
+// export default AboutUsAddModel
+
+
+import React, { useState } from "react";
+import { FaRegEdit } from "react-icons/fa";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../../components/ui/dialog";
+import { Field, Stack, Text, Textarea } from "@chakra-ui/react";
+import { Button } from "../../../components/ui/button";
+import { useUpdateAboutUsMutation } from "../../../Redux/Service/manage.aboutus.service";
function AboutUsAddModel() {
- return (
+ const [content, setContent] = useState(""); // State for the textarea input
+ const [updateAboutUs, { isLoading }] = useUpdateAboutUsMutation(); // Mutation for updating About Us
+ // const toast = useToast(); // Toast for feedback
+ // Handle form submission
+ const handleSubmit = async (e: any) => {
+ e.preventDefault(); // Prevent default form submission
+
+ try {
+ // Call the updateAboutUs mutation
+ const res = await updateAboutUs({ id: 2, updatedData: content }).unwrap();
+ console.log(res);
+
+ // Show success toast
+ // toast({
+ // title: "Success",
+ // description: "About Us content updated successfully",
+ // status: "success",
+ // duration: 5000,
+ // isClosable: true,
+ // });
+
+ // Clear the input field after successful submission
+ setContent("");
+ } catch (error) {
+ // Show error toast
+ // toast({
+ // title: "Error",
+ // description: "Failed to update About Us content",
+ // status: "error",
+ // duration: 5000,
+ // isClosable: true,
+ // });
+ }
+ };
+
+ return (
- {/* */}
-
-
+
-
- Edit
+
+
+ Edit
+
-
-
+
- AboutUs
-
+
+ AboutUs
+
+
-
-
-
-
- )
+
+ );
}
-export default AboutUsAddModel
\ No newline at end of file
+export default AboutUsAddModel;
\ No newline at end of file
diff --git a/src/Redux/Service/manage.aboutus.service.ts b/src/Redux/Service/manage.aboutus.service.ts
index 300f497..0e55fbb 100644
--- a/src/Redux/Service/manage.aboutus.service.ts
+++ b/src/Redux/Service/manage.aboutus.service.ts
@@ -24,18 +24,18 @@ export const aboutUs = createApi({
// 🔹 POST: Create a new post
createPost: builder.mutation>({
- query: (newPost) => ({
+ query: (data) => ({
url: "/posts",
method: "POST",
- body: newPost,
+ body: data,
}),
}),
// 🔹 PUT: Update an existing post
- updatePost: builder.mutation }>({
+ updateAboutUs: builder.mutation({
query: ({ id, updatedData }) => ({
url: `/posts/${id}`,
- method: "PUT",
+ method: "POST",
body: updatedData,
}),
}),
@@ -52,6 +52,7 @@ export const aboutUs = createApi({
export const {
useGetAboutUsQuery,
+ useUpdateAboutUsMutation,
@@ -64,8 +65,7 @@ export const {
useGetPostByIdQuery,
- useCreatePostMutation,
- useUpdatePostMutation,
+ useCreatePostMutation,
useDeletePostMutation
} = aboutUs;
@@ -77,6 +77,16 @@ export type Post = {
};
+export type UpdateAboutUsRequest={
+ id: number; updatedData: string
+}
+
+
+export type UpdateAboutUsResponse={
+ id: number; updatedData: string
+}
+
+
export type AboutUs = {
id: number;
language_master_xid: number;
From 84a64c9ae6f72d1fb46d0d11a94f596376635d68 Mon Sep 17 00:00:00 2001
From: "parth.ramani"
Date: Wed, 12 Feb 2025 12:04:00 +0530
Subject: [PATCH 6/8] worked on the aboutus
---
src/Pages/ManageCMS/AboutUs/AboutUs.tsx | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
index 89a481e..acc13b6 100644
--- a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
+++ b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
@@ -1,15 +1,17 @@
-import { Box, Center, HStack, Skeleton, Spinner, Text } from "@chakra-ui/react";
+import { Box, HStack, Skeleton, Text } from "@chakra-ui/react";
import MainFrame from "../../../components/MainFrame"
-import { p } from "framer-motion/client";
import AboutUsAddModel from "../../ManageCMS/AboutUs/AboutUsAddModel";
import { useGetAboutUsQuery } from "../../../Redux/Service/manage.aboutus.service";
-interface AboutUs {
+interface AboutUsContent {
content: string;
}
interface ApiResponse {
- data: AboutUs[];
+ data: AboutUsContent[];
+}
+interface AboutUs {
+ content: string;
}
@@ -18,13 +20,18 @@ const AboutUs = () => {
// const {
// data: data
// } = useGetAboutUsQuery()
- // const { data: response, isLoading } = useGetAboutUsQuery<{ data: ApiResponse }>();
- const { data: response, isLoading } = useGetAboutUsQuery();
+ // const { data: response,isLoading, } = useGetAboutUsQuery<{ data: ApiResponse }>();
+
+ // Simple way to fetch data
+ const { data } = useGetAboutUsQuery();
+
+ // Safely access the first content item
+ const content = data?.data?.[0]?.content;
console.log('====================================');
console.log(response);
console.log('====================================');
- const content = response?.data?.[0]?.content;
+ // const content = response?.data?.[0]?.content;
return (
From 0bd8cc6434f6cfe1d8e571f80c54215bbb1af1bf Mon Sep 17 00:00:00 2001
From: "Siddhesh.More"
Date: Wed, 12 Feb 2025 12:27:53 +0530
Subject: [PATCH 7/8] update types folder
---
.../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 12 +---
src/Redux/Service/privacy.policy.service.ts | 66 ++-----------------
src/Types/privacyPolicyTypes.tsx | 12 ++++
3 files changed, 20 insertions(+), 70 deletions(-)
create mode 100644 src/Types/privacyPolicyTypes.tsx
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
index f33ba9c..94b6f41 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
@@ -3,20 +3,10 @@ import MainFrame from "../../../components/MainFrame";
import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
-// Define interfaces
-interface PrivacyPolicyContent {
- id: number;
- content: string;
-}
-
-interface ApiResponse {
- data: {data:PrivacyPolicyContent[]};
- isLoading: boolean
-}
const PrivacyPolicy = () => {
// Fetch data using RTK Query with type annotations
- const { data, isLoading } = useGetPrivacyPolicyQuery();
+ const { data, isLoading } = useGetPrivacyPolicyQuery();
console.log(isLoading);
diff --git a/src/Redux/Service/privacy.policy.service.ts b/src/Redux/Service/privacy.policy.service.ts
index b2e0bbb..52ba4d8 100644
--- a/src/Redux/Service/privacy.policy.service.ts
+++ b/src/Redux/Service/privacy.policy.service.ts
@@ -1,68 +1,16 @@
-import { createApi } from "@reduxjs/toolkit/query/react"; // Fix import
-import { baseQueryWithReauth } from "./apiSlice";
-
-
-
+import { createApi } from "@reduxjs/toolkit/query/react";
+import { baseQueryWithReauth } from "./apiSlice"; // Ensure this is correctly configured
+import { PrivacyPolicyResponse } from "../../Types/privacyPolicyTypes";
export const privacyPolicy = createApi({
reducerPath: "privacyPolicy",
- baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling
+ baseQuery: baseQueryWithReauth, // Ensure this returns a valid `BaseQueryFn`
endpoints: (builder) => ({
- // 🔹 GET: Fetch all privacy policies
- getPrivacyPolicy: builder.query({
+ getPrivacyPolicy: builder.query({ // Fix types here
query: () => "/privacy-policy",
}),
-
- // 🔹 GET: Fetch a single post by ID
- // getPostById: builder.query({
- // query: (id) => `/posts/${id}`,
- // }),
-
- // 🔹 POST: Create a new post
- // createPost: builder.mutation>({
- // query: (newPost) => ({
- // url: "/posts",
- // method: "POST",
- // body: newPost,
- // }),
- // }),
-
- // 🔹 PUT: Update an existing post
- // updatePost: builder.mutation }>({
- // query: ({ id, updatedData }) => ({
- // url: `/posts/${id}`,
- // method: "PUT",
- // body: updatedData,
- // }),
- // }),
-
- // 🔹 DELETE: Remove a post by ID
- // deletePost: builder.mutation<{ success: boolean }, number>({
- // query: (id) => ({
- // url: `/posts/${id}`,
- // method: "DELETE",
- // }),
- // }),
}),
});
-// Export hooks for usage in components
-export const {
- useGetPrivacyPolicyQuery, // Export the correct hook
-
-} = privacyPolicy;
-
-
-// Define types at the top for better readability
-export type Post = {
- id: number;
- title: string;
- body: string;
-};
-
-export type PrivacyPolicy = {
- id: number;
- language_master_xid: number;
- content: string;
- is_active: boolean;
-};
\ No newline at end of file
+// Export hook
+export const { useGetPrivacyPolicyQuery } = privacyPolicy;
diff --git a/src/Types/privacyPolicyTypes.tsx b/src/Types/privacyPolicyTypes.tsx
new file mode 100644
index 0000000..d5a8493
--- /dev/null
+++ b/src/Types/privacyPolicyTypes.tsx
@@ -0,0 +1,12 @@
+export type PrivacyPolicy = {
+ success: boolean;
+ message: string;
+ data: T;
+};
+
+export interface PrivacyPolicyContent {
+ id: number;
+ content: string;
+}
+
+export type PrivacyPolicyResponse = PrivacyPolicy; // Fix here
From 066238b3340345aab9e959c59e752200e3eb6e05 Mon Sep 17 00:00:00 2001
From: "Siddhesh.More"
Date: Wed, 12 Feb 2025 12:34:31 +0530
Subject: [PATCH 8/8] updsate
---
src/Types/privacyPolicyTypes.tsx | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/Types/privacyPolicyTypes.tsx b/src/Types/privacyPolicyTypes.tsx
index d5a8493..fce8cb3 100644
--- a/src/Types/privacyPolicyTypes.tsx
+++ b/src/Types/privacyPolicyTypes.tsx
@@ -1,12 +1,13 @@
-export type PrivacyPolicy = {
- success: boolean;
- message: string;
- data: T;
-};
-
export interface PrivacyPolicyContent {
id: number;
+ language_master_xid: number;
content: string;
+ is_active: boolean;
}
-export type PrivacyPolicyResponse = PrivacyPolicy; // Fix here
+export interface PrivacyPolicyResponse {
+ status: "success" | "error"; // Assuming it can be "success" or "error"
+ status_code: number;
+ message: string;
+ data: PrivacyPolicyContent[];
+}
\ No newline at end of file