worked on the aboutus

This commit is contained in:
2025-02-12 12:04:00 +05:30
parent c5c3ebfedd
commit 84a64c9ae6

View File

@@ -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<ApiResponse>();
// 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 (