diff options
Diffstat (limited to 'src/hooks')
-rw-r--r-- | src/hooks/useAPIClient.ts | 22 | ||||
-rw-r--r-- | src/hooks/useQuery.ts | 2 |
2 files changed, 1 insertions, 23 deletions
diff --git a/src/hooks/useAPIClient.ts b/src/hooks/useAPIClient.ts index b523d1f..e992b42 100644 --- a/src/hooks/useAPIClient.ts +++ b/src/hooks/useAPIClient.ts @@ -28,28 +28,6 @@ const registerServiceHooks = <Item = any>(service: string): void => { hooks[service] = { useItem, useList }; }; -// Products -export interface Product { - _id: string; - name: string; - description: string; - price: number; - quantity: number; - specs: any; - createdAt: string; - updatedAt: string; -} - -// Contractors -export interface Contractor { - _id: string; - name: string; - fullName: string; - vatId: string; - type: string; - debt: number; -} - hooks.account = { useList: () => { const { data: transfers } = useSWR('/transfers', fetcher); diff --git a/src/hooks/useQuery.ts b/src/hooks/useQuery.ts index b2cb628..f025a46 100644 --- a/src/hooks/useQuery.ts +++ b/src/hooks/useQuery.ts @@ -1,6 +1,6 @@ import { useLocation } from 'react-router-dom'; -const useQuery = () => { +const useQuery = (): Record<string, string> => { const location = useLocation(); const searchParams = new URLSearchParams(location.search); return Object.fromEntries(searchParams); |