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}
-
+
);
};
diff --git a/src/assets/images/rubixLoader.gif b/src/assets/images/rubixLoader.gif
new file mode 100644
index 0000000..ddf94b6
Binary files /dev/null and b/src/assets/images/rubixLoader.gif differ
diff --git a/src/components/AmountCard/AmountCard.jsx b/src/components/AmountCard/AmountCard.jsx
index ea8d401..46c6e9e 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 8b6c329..f9e7b7a 100644
--- a/src/pages/Home.jsx
+++ b/src/pages/Home.jsx
@@ -240,6 +240,12 @@ const toast = useToast()
border={`1px solid ${
colorMode === "light" ? "#230A79" : "#565252"
}`}
+
+ pointerEvents={!searchTerm?'none':"auto"}
+
+ _hover={{
+ cursor:!searchTerm?'not-allowed':"pointer"
+ }}
>
{/* */}