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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user