quivr/frontend/lib/api/crawl/useCrawlApi.ts
Zineb El Bachiri 2b74ebc1f0
fix(Analytics): no tags tracking for upload & crawl (#1024)
* 🚚 create useCrawlApi to use in useCrawler hook

* 🚑 fix tracking in Crawl

* 🧑‍💻 add hot reloading within docker containers

* 🚑 fix tracking for upload

* 🚚 create useUploadApi for fileUpload request

* 📈 add june tag for Language change

* 🩹 revert dependencies
2023-08-23 10:03:10 +02:00

14 lines
375 B
TypeScript

import { useAxios } from "@/lib/hooks";
import { CrawlInputProps, crawlWebsiteUrl } from "./crawl";
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const useCrawlApi = () => {
const { axiosInstance } = useAxios();
return {
crawlWebsiteUrl: async (props: CrawlInputProps) =>
crawlWebsiteUrl(props, axiosInstance),
};
};