update
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { Box, HStack, Text, Skeleton, VStack } from "@chakra-ui/react";
|
import { Box, HStack, Text, Skeleton, VStack, Center } from "@chakra-ui/react";
|
||||||
import MainFrame from "../../../components/MainFrame";
|
import MainFrame from "../../../components/MainFrame";
|
||||||
import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
|
import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
|
||||||
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
|
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
|
||||||
@@ -21,9 +21,9 @@ const PrivacyPolicy = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<MainFrame transperant={true}>
|
<MainFrame transperant={true}>
|
||||||
{isLoading?<Spinner/>:
|
<VStack gap={4} pb={4} pt={0}>
|
||||||
<VStack gap={4} pb={4}>
|
{isLoading?
|
||||||
{data?.data?.map(({id,content}, index)=><VStack bg={'#fff'}
|
<Spinner/>:data?.data?.map(({id,content}, index)=><VStack bg={'#fff'}
|
||||||
boxShadow={'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px'} rounded={'lg'} p={3} key={id}>
|
boxShadow={'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px'} rounded={'lg'} p={3} key={id}>
|
||||||
<HStack
|
<HStack
|
||||||
w={"100%"}
|
w={"100%"}
|
||||||
@@ -40,9 +40,7 @@ const PrivacyPolicy = () => {
|
|||||||
</HStack>
|
</HStack>
|
||||||
|
|
||||||
{/* Render multiple skeletons or content based on loading state */}
|
{/* Render multiple skeletons or content based on loading state */}
|
||||||
{isFetching || !content ? (
|
|
||||||
<PrivacyPolicySkeleton/>
|
|
||||||
) : (
|
|
||||||
<Text
|
<Text
|
||||||
as="p"
|
as="p"
|
||||||
fontSize="sm"
|
fontSize="sm"
|
||||||
@@ -51,9 +49,9 @@ const PrivacyPolicy = () => {
|
|||||||
>
|
>
|
||||||
{content}
|
{content}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
|
||||||
</VStack>)}
|
</VStack>)}
|
||||||
</VStack>}
|
</VStack>
|
||||||
</MainFrame>
|
</MainFrame>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const nav = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Manage Users",
|
title: "Manage Users",
|
||||||
path: "/manage-users",
|
// path: "/manage-users",
|
||||||
Icon: BiUserPin,
|
Icon: BiUserPin,
|
||||||
type:'multiple',
|
type:'multiple',
|
||||||
children: [
|
children: [
|
||||||
@@ -65,7 +65,7 @@ export const nav = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Manage CMS",
|
title: "Manage CMS",
|
||||||
path: "/manage-cms",
|
// path: "",
|
||||||
Icon: AiOutlineFileText,
|
Icon: AiOutlineFileText,
|
||||||
type:'multiple',
|
type:'multiple',
|
||||||
children: [
|
children: [
|
||||||
@@ -104,7 +104,7 @@ export const nav = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Master Module",
|
title: "Master Module",
|
||||||
path: "/master-module",
|
// path: "/master-module",
|
||||||
Icon: BsBoxes,
|
Icon: BsBoxes,
|
||||||
type:'multiple',
|
type:'multiple',
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -3,6 +3,11 @@ export interface PrivacyPolicyContent {
|
|||||||
language_master_xid: number;
|
language_master_xid: number;
|
||||||
content: string;
|
content: string;
|
||||||
is_active: boolean;
|
is_active: boolean;
|
||||||
|
privacy_language:{
|
||||||
|
id:number;
|
||||||
|
language_code:string;
|
||||||
|
language_name:string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PrivacyPolicyResponse {
|
export interface PrivacyPolicyResponse {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ interface MainFrameProps {
|
|||||||
|
|
||||||
const MainFrame: FC<MainFrameProps> = ({ children, transperant }) => {
|
const MainFrame: FC<MainFrameProps> = ({ children, transperant }) => {
|
||||||
return (
|
return (
|
||||||
<MotionVStack rounded="lg" overflowY={'auto'} overflowX={'hidden'} {...OPACITY_ON_LOAD} w="100%" minH="93%" pe={2} ps={1.5} pt={transperant?0:1} pb={2}>
|
<MotionVStack rounded="lg" overflowY={'auto'} overflowX={'hidden'} {...OPACITY_ON_LOAD} w="100%" minH="93%" pe={2} ps={1.5} pt={1} pb={2}>
|
||||||
<Box
|
<Box
|
||||||
w="100%"
|
w="100%"
|
||||||
h="100%"
|
h="100%"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Center } from '@chakra-ui/react'
|
import { Center } from '@chakra-ui/react'
|
||||||
import './Spinner.css'
|
import './Spinner.css'
|
||||||
export const Spinner = () => <Center w={'100%'} h={'100%'}> <div className='loader'/></Center>
|
import MainFrame from '../MainFrame'
|
||||||
|
export const Spinner = () =><Center boxShadow={'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px'} rounded={'lg'} w={'100%'} h={'89vh'} bg={'#fff'} > <div className='loader'/></Center>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user