import { useQuery } from "@tanstack/react-query"; import { CAMBASE } from "../../../utils/config"; const getDownloadLogFiles = async () => { const response = await fetch(`${CAMBASE}/LogView/download?filename=FlexiAI-0.log`); if (!response.ok) { throw new Error("Failed to download log files"); } return response.blob(); }; export const useDownloadLogFiles = () => { const downloadLogFilesQuery = useQuery({ queryKey: ["downloadLogFiles"], queryFn: getDownloadLogFiles, enabled: false, }); return { downloadLogFilesQuery }; };