mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-21 02:11:35 +03:00
14 lines
375 B
TypeScript
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),
|
||
|
};
|
||
|
};
|