const fetchSteps = async () => {
if (stepsFetched.current) {
console.log("stepsFetched is true");
return;
}
try {
const response = await axios.get(`${apiUrl}/api/steps`);
const fetchInventory = async () => {
if (dataFetched.current) {
console.log("dataFetched is true");
setLoading(false);
return;
}
try {
const response = await axios.get(`${apiUrl}/api/admin/vehicle/list`);
};
const fetchSteps = async () => {
if (stepsFetched.current) {
console.log("stepsFetched is true");
return;
}
try {
const response = await axios.get(`${apiUrl}/api/steps`);
const fetchInventory = async () => {
if (dataFetched.current) {
console.log("dataFetched is true");
setLoading(false);
return;
}
try {
const response = await axios.get(`${apiUrl}/api/admin/vehicle/list`);
};