diff --git a/dev-dist/sw.js b/dev-dist/sw.js
index 23a39ae..6c1b423 100644
--- a/dev-dist/sw.js
+++ b/dev-dist/sw.js
@@ -82,7 +82,7 @@ define(['./workbox-b5f7729d'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812"
}, {
"url": "index.html",
- "revision": "0.1vefs8ecrtg"
+ "revision": "0.k4sl9nq3coo"
}], {});
workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
diff --git a/src/Layout/DefaultLayout.jsx b/src/Layout/DefaultLayout.jsx
index 7f80170..d30faa3 100644
--- a/src/Layout/DefaultLayout.jsx
+++ b/src/Layout/DefaultLayout.jsx
@@ -10,50 +10,37 @@ import { timeZone } from "../Constants/Constants";
import SplashScreen from "../pages/SplashScreen";
const DefaultLayout = ({ children }) => {
- const location = useLocation();
useEffect(() => {
localStorage.setItem("light", true)
});
-
- // const {
- // isLoading,
- // } = useGetKPIDetailsQuery()
-
+
const {
- isLoading: dateDataLoading,
- } = useGetDateWiseDataQuery(timeZone === "Asia/Calcutta" ? "Asia/Kolkata" : timeZone);
-
+ data,
+ isLoading,
+ } = useGetKPIDetailsQuery()
const {
isLoading: dailyDataLoading,
} = useGetDailyDataQuery(timeZone === "Asia/Calcutta" ? "Asia/Kolkata" : timeZone);
// Fetch transactions based on the current page and page size
const {
- isLoading: isTransAllLoading,
+ refetch
} = useGetTransAllQuery({
pageNumber: 1,
pageSize: 10,
});
+ // useEffect(() => {
+ // refetch()
+ // }, [])
+
+
return (
- dateDataLoading || dailyDataLoading || isTransAllLoading ?:
+ dailyDataLoading || isLoading ? :
- {/* */}
{children}
- {/* */}
);
diff --git a/src/components/ChartsTabs.jsx b/src/components/ChartsTabs.jsx
index 96a46ec..807d7ff 100644
--- a/src/components/ChartsTabs.jsx
+++ b/src/components/ChartsTabs.jsx
@@ -54,7 +54,7 @@ function ChartsTabs({ selectedValue, setSelectedValue, days }) {
const { getRootProps, getRadioProps } = useRadioGroup({
name: "framework",
- defaultValue: "12 Months", // Default tab is set to '24 Hrs'
+ defaultValue: "24 Hrs", // Default tab is set to '24 Hrs'
onChange: (value) => setSelectedValue(value),
});
diff --git a/src/components/Doughnut/LineChart.jsx b/src/components/Doughnut/LineChart.jsx
index 6efaa9c..0012b7b 100644
--- a/src/components/Doughnut/LineChart.jsx
+++ b/src/components/Doughnut/LineChart.jsx
@@ -28,17 +28,15 @@ ChartJS.register(
const LineChart = () => {
const { colorMode } = useColorMode();
- const [selectedValue, setSelectedValue] = useState("12 Months");
+ const [selectedValue, setSelectedValue] = useState("24 Hrs");
const [labels, setLabels] = useState([]);
const [dataset, setDataset] = useState([]);
const [isMobile] = useMediaQuery("(max-width: 768px)");
const {
data: monthlyData,
- isLoading: monthlyDataLoading,
} = useGetMonthlyDataQuery(timeZone === "Asia/Calcutta" ? "Asia/Kolkata" : timeZone);// Check if the screen is desktop or mobile
- const isDesktop = window.innerWidth >= 768;
// Monthly dataset
const dataSetMonthly = monthlyData?.map((data) => data?.transactionCount);
@@ -54,7 +52,6 @@ const LineChart = () => {
const {
data: dailyData,
- isLoading: dailyDataLoading,
} = useGetDailyDataQuery(timeZone === "Asia/Calcutta" ? "Asia/Kolkata" : timeZone);
const dataSetDaily = dailyData?.map((data) => data?.transactionCount);
@@ -62,7 +59,6 @@ const LineChart = () => {
const {
data: dateData,
- isLoading: dateDataLoading,
} = useGetDateWiseDataQuery(timeZone === "Asia/Calcutta" ? "Asia/Kolkata" : timeZone);
const dataSetDate = dateData?.data?.map((data) => data?.transactionCount);
@@ -99,13 +95,7 @@ const LineChart = () => {
},
],
};
- // Calculate maximum value with a 10% buffer and round it up to the nearest whole number
- // console.log(dataset);
- // const maxYValue = Math.round(Math.max(...dataset) * 1.1);
-
- // const maxYValue = Math?.ceil(Math?.max(...dataset) * 1.1);
-
const options = {
responsive: true,
plugins: {
diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx
index 9f02a19..8915c39 100644
--- a/src/pages/Home.jsx
+++ b/src/pages/Home.jsx
@@ -52,38 +52,6 @@ const Home = () => {
const toast = useToast()
const[ genrateSortURL ] = useGnerateShortUrlMutation()
- // const handleGenrateShortURL = async () => {
- // try {
- // // Ensure searchTerm is converted to a string before passing to the API
- // const res = await genrateSortURL(JSON.stringify(searchTerm));
- // console.log(res);
- // } catch (error) {
- // console.error("Error generating short URL:", error);
- // }
- // };
-
-
- // function copyToClipboard(text) {
- // if (!navigator.clipboard) {
- // console.error("Clipboard API is not available.");
- // return;
- // }
-
- // navigator.clipboard
- // .writeText(text)
- // .then(() => {
- // toast({
- // render: () => (
- //
- // ),
- // });
- // setIsCopy(true)
- // })
- // .catch((err) => {
- // console.error("Failed to copy text: ", err);
- // });
- // }
-
function copyToClipboard(text) {
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard
@@ -167,20 +135,15 @@ const toast = useToast()
Generate Short Url
@@ -248,14 +209,12 @@ const toast = useToast()
cursor:!searchTerm?'not-allowed':"pointer"
}}
>
- {/* */}
- {/* Slide-down animated HStack */}
{isLoading || linkVisible && (