From 8e2fb1d1d8ce019a4c2f746110b2e9178cf125b9 Mon Sep 17 00:00:00 2001 From: rockyeverlast Date: Thu, 16 May 2024 18:53:31 +0530 Subject: [PATCH] Updated Stats page --- src/components/HomePage/Stats.jsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/components/HomePage/Stats.jsx b/src/components/HomePage/Stats.jsx index 167b62b..4e9da62 100644 --- a/src/components/HomePage/Stats.jsx +++ b/src/components/HomePage/Stats.jsx @@ -4,12 +4,31 @@ import { useInView } from "react-intersection-observer"; import CountUp from "react-countup"; import banner from "../../assets/images/Statsbanner.png"; import { useMediaQuery } from "@chakra-ui/react"; +import { + useGetStatApiQuery, + useGetStatsApiQuery, +} from "../../Redux/slice/statsSlice"; const StatsContent = { heading: `Key Statistics`, }; const Stats = () => { + const { + data: statsData, + error: statsError, + isLoading: statsIsLoading, + } = useGetStatsApiQuery(); + + const { + data: statData, + error: statError, + isLoading: statIsLoading, + } = useGetStatApiQuery(); + + // console.log(statsData); + // console.log(statData); + const [isSmallScreen] = useMediaQuery("(max-width: 435px)"); const { ref, inView } = useInView({ threshold: 0.5,