update final loaders
This commit is contained in:
@@ -82,7 +82,7 @@ define(['./workbox-b5f7729d'], (function (workbox) { 'use strict';
|
||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.4pi6ovbpjag"
|
||||
"revision": "0.grsmblr837g"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
||||
@@ -30,6 +30,7 @@ import rbtLogoOutline from "../../assets/images/rubix-filled.svg";
|
||||
import rbtLogoDark from "../../assets/images/RBTLogo.svg";
|
||||
import { HiOutlineRefresh } from "react-icons/hi";
|
||||
import FullScreenLoaader from "../FullScreenLoaader/FullScreenLoaader";
|
||||
import SplashScreen from "../../pages/SplashScreen";
|
||||
|
||||
// Define the keyframes
|
||||
export const rotate = keyframes`
|
||||
@@ -68,42 +69,22 @@ const LatestTransactions = () => {
|
||||
const {
|
||||
data: transAll,
|
||||
isLoading: isTransAllLoading,
|
||||
isFetching,
|
||||
refetch: transAllRefetch,
|
||||
} = useGetTransAllQuery({
|
||||
pageNumber: currentPage,
|
||||
pageSize: pageSize,
|
||||
});
|
||||
|
||||
// Set interval to refetch data every 30 seconds
|
||||
// useEffect(() => {
|
||||
// const intervalId = setInterval(() => {
|
||||
// transCountRefetch(); // Refetch transaction count
|
||||
// transAllRefetch(); // Refetch transactions
|
||||
// }, 30000); // 30000 ms = 30 seconds
|
||||
|
||||
// return () => clearInterval(intervalId); // Clear interval on component unmount
|
||||
// }, [transCountRefetch, transAllRefetch]);
|
||||
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setTotalItems(transCount?.data?.transactionCount);
|
||||
}, [transCount]);
|
||||
|
||||
// function copyToClipboard(text) {
|
||||
// navigator.clipboard
|
||||
// .writeText(text)
|
||||
// .then(() => {
|
||||
// toast({
|
||||
// render: () => (
|
||||
// <ToastBox status={"warn"} message={"Text copied to clipboard"} />
|
||||
// ),
|
||||
// });
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.error("Failed to copy text: ", err);
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
|
||||
function copyToClipboard(text) {
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
@@ -170,11 +151,14 @@ const LatestTransactions = () => {
|
||||
setRelativeRefreshTime(`${timeDiff} minutes ago`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
isTransCountLoading? <HStack w={'100%'} justifyContent={'center'} > <Spinner color="purple.700" /></HStack>:<Container
|
||||
isFetching? <FullScreenLoaader />:<Container
|
||||
mt={location?.pathname === "/view-all-transaction" ? 24 : 0}
|
||||
mb={location?.pathname === "/view-all-transaction" ? 15 : 0}
|
||||
maxW="6xl"
|
||||
minH={'100vh'}
|
||||
>
|
||||
<Grid
|
||||
position={"relative"}
|
||||
@@ -677,6 +661,7 @@ const LatestTransactions = () => {
|
||||
)
|
||||
)}
|
||||
</Box>
|
||||
{false&&<Text display={'flex'} justifyContent={'center'} fontSize={'xs'} alignItems={'center'} textAlign={'center'} p={2}>Loading... <Spinner ms={1} size={'xs'}/></Text>}
|
||||
<Pagination
|
||||
pageSize={pageSize}
|
||||
setPageSize={setPageSize}
|
||||
|
||||
@@ -32,6 +32,7 @@ import { OPACITY_ON_LOAD } from "../Layout/animations";
|
||||
import { HiOutlineRefresh } from "react-icons/hi";
|
||||
import rbtLogoDark from "../assets/images/RBTLogo.svg";
|
||||
import { rotate } from "../components/LatestTransactions/LatestTransactions";
|
||||
import SplashScreen from "./SplashScreen";
|
||||
|
||||
const MainNet = () => {
|
||||
const { overview } = useContext(GlobalStateContext);
|
||||
@@ -52,18 +53,19 @@ const MainNet = () => {
|
||||
refetch: transGetMainNetCountRefetch,
|
||||
} = useGetMainNetCountQuery();
|
||||
|
||||
console.log(transGetMainNetCount?.data);
|
||||
|
||||
const {
|
||||
data: mainNetData,
|
||||
isLoading: isMainNetDataLoading,
|
||||
isFetching,
|
||||
refetch: mainNetRefetch,
|
||||
} = useGetMainNetQuery({
|
||||
pageNumber: currentPage,
|
||||
pageSize: pageSize,
|
||||
});
|
||||
|
||||
console.log(mainNetData);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setTotalItems(transGetMainNetCount?.data?.transactionCount);
|
||||
@@ -119,8 +121,9 @@ const MainNet = () => {
|
||||
setRelativeRefreshTime("Just now"); // Reset relative time to "Just now"
|
||||
};
|
||||
|
||||
return isTransGetMainNetCountLoading || isMainNetDataLoading ? (
|
||||
return isTransGetMainNetCountLoading || isMainNetDataLoading || isFetching ? (
|
||||
<FullScreenLoaader />
|
||||
// <SplashScreen/>
|
||||
) : (
|
||||
<Box
|
||||
bg={colorMode === "light" ? "#f5f5f7" : "none"}
|
||||
|
||||
@@ -64,14 +64,15 @@ const SubnetId = () => {
|
||||
|
||||
const {
|
||||
data,
|
||||
isLoading
|
||||
isLoading,
|
||||
refetch,
|
||||
isFetching
|
||||
} = useGetSubnetAllQuery({
|
||||
pageNumber: currentPage,
|
||||
pageSize: pageSize,
|
||||
searchTerm: debouncedSearchTerm
|
||||
})
|
||||
|
||||
console.log(data?.data?.items);
|
||||
|
||||
|
||||
|
||||
@@ -112,6 +113,8 @@ const SubnetId = () => {
|
||||
),
|
||||
"Network Name": item?.networkName,
|
||||
}));
|
||||
|
||||
|
||||
return (
|
||||
<Box
|
||||
bg={colorMode === "light" ? "#f5f5f7" : "none"}
|
||||
@@ -223,7 +226,7 @@ const SubnetId = () => {
|
||||
</VStack>
|
||||
|
||||
|
||||
{isLoading?<FullScreenLoaader half={true}/>: extractedArray?.length === 0 ? <Box p={"4rem 0"} >
|
||||
{isFetching?<FullScreenLoaader half={true}/>: extractedArray?.length === 0 ? <Box p={"4rem 0"} >
|
||||
<Container maxW="6xl">
|
||||
<HStack justifyContent={"center"} mt={10}>
|
||||
<Image w={"40px"} src={Search}/>
|
||||
|
||||
@@ -56,13 +56,24 @@ const SubnetInner = () => {
|
||||
const {
|
||||
data,
|
||||
isLoading,
|
||||
refetch
|
||||
isFetching,
|
||||
isError,
|
||||
error,
|
||||
isSuccess,
|
||||
refetch,
|
||||
isUninitialized,
|
||||
fulfilledTimeStamp,
|
||||
status
|
||||
} = useGetSubnetByIdQuery({
|
||||
id:params?.id,
|
||||
pageNumber: currentPage,
|
||||
pageSize: pageSize,
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setTotalItems(data?.data?.totalCount);
|
||||
}, [data]);
|
||||
@@ -157,7 +168,7 @@ const SubnetInner = () => {
|
||||
<MdContentCopy/> Copy short url
|
||||
</Button>
|
||||
</Container>
|
||||
{isLoading ? <FullScreenLoaader half={true}/>:<Box>
|
||||
{isFetching ? <FullScreenLoaader half={true}/>:<Box>
|
||||
{data?.data?.items?.length===0 || isLoading?<HStack h={'35vh'} justifyContent={"center"} mt={10}>
|
||||
<Image w={"40px"} src={Search}/>
|
||||
<Text as={"span"} color={"#787878"}>{"No records found"}</Text>
|
||||
|
||||
Reference in New Issue
Block a user