feat(forklifts): added the ability to add new forklifts in

This commit is contained in:
2025-11-20 17:51:06 -06:00
parent 7b28f4e9ef
commit 7b6c9bdfbf
9 changed files with 710 additions and 1 deletions

View File

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