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 PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
|
||||
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
|
||||
@@ -21,9 +21,9 @@ const PrivacyPolicy = () => {
|
||||
|
||||
return (
|
||||
<MainFrame transperant={true}>
|
||||
{isLoading?<Spinner/>:
|
||||
<VStack gap={4} pb={4}>
|
||||
{data?.data?.map(({id,content}, index)=><VStack bg={'#fff'}
|
||||
<VStack gap={4} pb={4} pt={0}>
|
||||
{isLoading?
|
||||
<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}>
|
||||
<HStack
|
||||
w={"100%"}
|
||||
@@ -40,9 +40,7 @@ const PrivacyPolicy = () => {
|
||||
</HStack>
|
||||
|
||||
{/* Render multiple skeletons or content based on loading state */}
|
||||
{isFetching || !content ? (
|
||||
<PrivacyPolicySkeleton/>
|
||||
) : (
|
||||
|
||||
<Text
|
||||
as="p"
|
||||
fontSize="sm"
|
||||
@@ -51,9 +49,9 @@ const PrivacyPolicy = () => {
|
||||
>
|
||||
{content}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
</VStack>)}
|
||||
</VStack>}
|
||||
</VStack>
|
||||
</MainFrame>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ export const nav = [
|
||||
},
|
||||
{
|
||||
title: "Manage Users",
|
||||
path: "/manage-users",
|
||||
// path: "/manage-users",
|
||||
Icon: BiUserPin,
|
||||
type:'multiple',
|
||||
children: [
|
||||
@@ -65,7 +65,7 @@ export const nav = [
|
||||
},
|
||||
{
|
||||
title: "Manage CMS",
|
||||
path: "/manage-cms",
|
||||
// path: "",
|
||||
Icon: AiOutlineFileText,
|
||||
type:'multiple',
|
||||
children: [
|
||||
@@ -104,7 +104,7 @@ export const nav = [
|
||||
},
|
||||
{
|
||||
title: "Master Module",
|
||||
path: "/master-module",
|
||||
// path: "/master-module",
|
||||
Icon: BsBoxes,
|
||||
type:'multiple',
|
||||
children: [
|
||||
|
||||
@@ -3,6 +3,11 @@ export interface PrivacyPolicyContent {
|
||||
language_master_xid: number;
|
||||
content: string;
|
||||
is_active: boolean;
|
||||
privacy_language:{
|
||||
id:number;
|
||||
language_code:string;
|
||||
language_name:string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface PrivacyPolicyResponse {
|
||||
|
||||
@@ -14,7 +14,7 @@ interface MainFrameProps {
|
||||
|
||||
const MainFrame: FC<MainFrameProps> = ({ children, transperant }) => {
|
||||
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
|
||||
w="100%"
|
||||
h="100%"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Center } from '@chakra-ui/react'
|
||||
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