Merge branch 'main' of http://git.wdipl.com/Siddhesh.More/rubix-explore
This commit is contained in:
@@ -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 (
|
||||
<Box>
|
||||
isLoading || dateDataLoading || dailyDataLoading || isTransAllLoading ?<SplashScreen/>: <Box>
|
||||
<NavBar />
|
||||
<SlideFade
|
||||
key={location.pathname}
|
||||
@@ -34,7 +54,7 @@ const DefaultLayout = ({ children }) => {
|
||||
{children}
|
||||
</SlideFade>
|
||||
<Footer />
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
BIN
src/assets/images/rubixLoader.gif
Normal file
BIN
src/assets/images/rubixLoader.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 819 KiB |
@@ -24,11 +24,10 @@ const AmountCard = () => {
|
||||
const { colorMode} = useColorMode();
|
||||
const [ kpDetails, setKpDetails ] = useState(null)
|
||||
|
||||
|
||||
|
||||
const {
|
||||
data,
|
||||
isLoading,
|
||||
|
||||
} = useGetKPIDetailsQuery()
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -240,6 +240,12 @@ const toast = useToast()
|
||||
border={`1px solid ${
|
||||
colorMode === "light" ? "#230A79" : "#565252"
|
||||
}`}
|
||||
|
||||
pointerEvents={!searchTerm?'none':"auto"}
|
||||
|
||||
_hover={{
|
||||
cursor:!searchTerm?'not-allowed':"pointer"
|
||||
}}
|
||||
>
|
||||
{/* <IoSearch fontSize={"20px"} /> */}
|
||||
<BiSearchAlt fontSize={"20px"} />
|
||||
|
||||
Reference in New Issue
Block a user