fix(file name wrong): fixed the name of the file for getCompanies

This commit is contained in:
2025-11-02 16:27:08 -06:00
parent 5023d4d129
commit 8996da7eb4
3 changed files with 19 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
import { queryOptions } from "@tanstack/react-query";
import axios from "axios";
export function getCompanies() {
return queryOptions({
queryKey: ["getCompanies"],
queryFn: () => fetch(),
staleTime: 5000,
refetchOnWindowFocus: true,
});
}
const fetch = async () => {
const { data } = await axios.get("/lst/api/forklifts/companies");
return data.data;
};