mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-15 05:31:33 +03:00
867904f19d
Issue: https://github.com/StanGirard/quivr/issues/1503 Demo: https://github.com/StanGirard/quivr/assets/63923024/fc354768-e25b-4d16-8e40-bfdbf950ddcd
25 lines
927 B
TypeScript
25 lines
927 B
TypeScript
import axios from "axios";
|
|
|
|
import { DEFAULT_CMS_URL } from "@/lib/config/CONSTANTS";
|
|
|
|
import { getDemoVideoUrl } from "./utils/demoVideo";
|
|
import { getNotificationBanner } from "./utils/notificationBanner";
|
|
import { getSecurityQuestions } from "./utils/securityQuestion";
|
|
import { getTestimonials } from "./utils/testimonials";
|
|
import { getUseCases } from "./utils/useCases";
|
|
|
|
const axiosInstance = axios.create({
|
|
baseURL: `${process.env.NEXT_PUBLIC_CMS_URL ?? DEFAULT_CMS_URL}`,
|
|
});
|
|
|
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
export const useCmsApi = () => {
|
|
return {
|
|
getTestimonials: () => getTestimonials(axiosInstance),
|
|
getUseCases: () => getUseCases(axiosInstance),
|
|
getDemoVideoUrl: () => getDemoVideoUrl(axiosInstance),
|
|
getSecurityQuestions: () => getSecurityQuestions(axiosInstance),
|
|
getNotificationBanner: () => getNotificationBanner(axiosInstance),
|
|
};
|
|
};
|