From 2edae877c032fdd72ee13110af97be206bd87f3a Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Tue, 5 Nov 2024 17:56:39 +0530 Subject: [PATCH 1/2] update siddhesh --- src/components/AmountCard/AmountCard.jsx | 3 +-- src/pages/Home.jsx | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/AmountCard/AmountCard.jsx b/src/components/AmountCard/AmountCard.jsx index e37c6aa..75732bf 100644 --- a/src/components/AmountCard/AmountCard.jsx +++ b/src/components/AmountCard/AmountCard.jsx @@ -24,11 +24,10 @@ const AmountCard = () => { const { colorMode} = useColorMode(); const [ kpDetails, setKpDetails ] = useState(null) - - const { data, isLoading, + } = useGetKPIDetailsQuery() useEffect(() => { diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index 0c388da..daf9667 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -239,6 +239,12 @@ const toast = useToast() border={`1px solid ${ colorMode === "light" ? "#230A79" : "#565252" }`} + + pointerEvents={!searchTerm?'none':"auto"} + + _hover={{ + cursor:!searchTerm?'not-allowed':"pointer" + }} > {/* */} From e7a05cc9ed504b538ab6a4bbaa2eac7d1d9ad2a8 Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Tue, 5 Nov 2024 20:06:37 +0530 Subject: [PATCH 2/2] updatd oading --- src/Layout/DefaultLayout.jsx | 30 +++++++++++++++++++++++++----- src/assets/images/rubixLoader.gif | Bin 0 -> 838248 bytes 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 src/assets/images/rubixLoader.gif diff --git a/src/Layout/DefaultLayout.jsx b/src/Layout/DefaultLayout.jsx index 7260328..f7ced1e 100644 --- a/src/Layout/DefaultLayout.jsx +++ b/src/Layout/DefaultLayout.jsx @@ -5,19 +5,39 @@ import Footer from "../components/Footer/Footer"; import { Box, ScaleFade, SlideFade } from "@chakra-ui/react"; import { useLocation } from "react-router-dom"; import { useEffect } from "react"; +import { useGetDailyDataQuery, useGetDateWiseDataQuery, useGetKPIDetailsQuery, useGetTransAllQuery } from "../Services/api.service"; +import { timeZone } from "../Constants/Constants"; +import SplashScreen from "../pages/SplashScreen"; const DefaultLayout = ({ children }) => { const location = useLocation(); - useEffect(() => { localStorage.setItem("light", true) }); - // console.log(localStorage?.getItem("light")); - + const { + isLoading, + } = useGetKPIDetailsQuery() + + const { + isLoading: dateDataLoading, + } = useGetDateWiseDataQuery(timeZone === "Asia/Calcutta" ? "Asia/Kolkata" : timeZone); + + const { + isLoading: dailyDataLoading, + } = useGetDailyDataQuery(timeZone === "Asia/Calcutta" ? "Asia/Kolkata" : timeZone); + + // Fetch transactions based on the current page and page size + const { + isLoading: isTransAllLoading, + } = useGetTransAllQuery({ + pageNumber: 1, + pageSize: 10, + }); + return ( - + isLoading || dateDataLoading || dailyDataLoading || isTransAllLoading ?: { {children}