Refactor API calls to use apiRequest instead of clientFetch

Replaces all usages of clientFetch with the new apiRequest utility across dashboard pages, modal components, and the profit analytics service. This standardizes API interaction and improves consistency in request handling.
This commit is contained in:
g
2025-12-12 20:05:26 +00:00
parent fd5440c4da
commit 07dcaf55c0
7 changed files with 26 additions and 37 deletions

View File

@@ -20,7 +20,7 @@ import type { ProductModalProps, ProductData } from "@/lib/types";
import { toast } from "sonner";
import type React from "react";
import { Plus } from "lucide-react";
import { clientFetch } from "@/lib/api";
import { apiRequest } from "@/lib/api";
import { Switch } from "@/components/ui/switch";
type CategorySelectProps = {