- Delete unused `callApi` utility and related imports across components. - Replace `callApi` with direct `fetch` usage in `validateCustomer` and `addCustomer`. - Update `customerRoutes` to include `/api` prefix for consistency. - Refactor `useErrorHandler` to ensure comprehensive state management during errors. - Improve `ErrorBoundary` component text for better clarity in fallback UI. - Align `CustomersPage` logic with `useCallback` for optimized dependency management.
6 lines
159 B
TypeScript
6 lines
159 B
TypeScript
export const customerRoutes = {
|
|
create: "/api/customers",
|
|
validate: "/api/customers/validate",
|
|
getById: (id: string) => `/api/customers/${id}`,
|
|
};
|