- added download button

- added reads for number plate sightings
This commit is contained in:
2025-12-03 10:46:36 +00:00
parent 2a4afc7eae
commit f7964d4fc0
5 changed files with 151 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
import { useQuery } from "@tanstack/react-query";
import { CAMBASE } from "../../../utils/config";
const getStoreData = async () => {
const response = await fetch(`${CAMBASE}/Store0/diagnostics-json`);
if (!response.ok) {
throw new Error("Network response was not ok");
}
return response.json();
};
export const useGetStore = () => {
const storeQuery = useQuery({
queryKey: ["storeData"],
queryFn: getStoreData,
// refetchInterval: 10 * 60 * 1000,
});
return { storeQuery };
};